in reply to Re: Re: Re: DBI Wrapper Feature Comparison
in thread DBI Wrapper Feature Comparison
I see these OO wrapper modules as more like using CGI.pm's HTML generation functions instead of writing webpages in HTML. They aren't about separating Perl and SQL. They're about replacing SQL with a new Perl OO notation. In my opinion that only makes sense if you're uncomfortable working with SQL. I haven't seen one yet that looked like it was worth the trouble. All the stuff they claim to make so much easier is already easy if you're fluent with SQL!
All depends on your definition of "easy" I guess. If I have a database where Class::DBI would be a good match, and I need to access/update all the columns on a row by row basis I'd rather do:
use strict; use base qw(Class::DBI::Pg); __PACKAGE__->set_db( Main => 'dbi:Pg:dbname=dbname', 'user', 'pass' ); __PACKAGE__->set_up_table( 'table' );
Than spend time writing all the code to fetch, update and store data by hand.
Not that I'm against writing SQL by hand. Do it all the time. It's just that I like perl to automate the dull repetitive bits where feasible.
|
---|