Class::DBI

chrimble on 2003-07-24T10:46:50

I've been having a great time playing with Class::DBI these past few days. Although I've been vaguely aware of it for a while, I hadn't really considered using it till I read Kake's article on perl.com, and realised that it might be suitable for use in the project I'm currently working on (which had until that point used a more traditional vanilla DBI implementation).

Talk about straightforward - it took about two minutes to set up, and it all worked first time. If only everything were that easy. ;-)

There are only two things I still need to work out before I'm completely happy.

Firstly, it doesn't seem to want to play nicely with Apache::Reload, at least at first glance. So I'm back to an apache stop/start cycle, at least whenever I update the database declarations. Knowing me, I'm missing something blindingly obvious, but it'd still be nice to sort it out. Though in the grand scheme of things, it's really not that big a deal.

The second issue is that I currently don't know exactly how much performance overhead it incurs, so I need to write some benchmarks. Whilst I have a feeling it's going to be quite a bit (considering what it does), I want to know exactly how much, as compared to plain DBI. OK, yeah, premature optimisation and all that, but it'd be nice to know what to expect before I start hammering it for real. ;-)


Benchmark

IlyaM on 2003-07-24T11:17:14

I just wrote one

Re:Benchmark

chrimble on 2003-07-24T11:46:59

What serendipitous timing! Thanks for the pointer!

Apache::Reload

Dom2 on 2003-07-24T12:37:03

I've not noticed that there's a problem with this, but OTOH, I tend to develop my DB schema first, with tests all running from the command line. When I get around to mod_perl / mason development, the schema is rarely changed, so it's less of an issue.

-Dom

Re:Apache::Reload

chrimble on 2003-07-24T15:13:15

I only noticed because I was playing about with the module and changing things to see how they worked - so it's not really a problem, more of a niggle. I wouldn't expect to be changing the schema much under a normal development cycle either. :-)