NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
overstating it a bit? (Score:1)
Class::DBI is pretty good for a simple O/R mapper, but Hibernate has a much more complete feature set. If there was a full-featured port of Hibernate for Perl, I would definitely be using it instead of Class::DBI.
Reply to This
Re:overstating it a bit? (Score:1)
I'm not entirely convinced that
__PACKAGE__->constrain_column(name => qr/\w{1,16}/);
is that much more confusing than their XML, but the constrain_column stuff is fairly simplistic at the minute (interface wise. It's actually designed so that my base class can set up certain things to make it hook into CGI::Untaint in nice ways). I'm certainly tempted to allow:
__PACKAGE__->constr
Re:overstating it a bit? (Score:1)
That was even easier than I'd expected. (Other than perl needing to disambiguate via length()...)
} elsif (ref $how eq "Regexp") {
$class->add_constraint(regexp => $col => sub { shift =~ $how });
|+ } elsif (ref $how eq "CODE") {
|+ $class->add_constraint(
|+ code => $col => sub { local $_ = $_[0]; $how->($_) });
} else {
Tony
Re:overstating it a bit? (Score:1)
Hibernate has many good features. Here are some of the ones I would mo
Re:overstating it a bit? (Score:2)
I'm now beginning to contemplate a strictly bottom-up ORM approach, where you would get this information dynamically instead of by hand.
Actually, I'm starting to think ORM's are an unnecessary layer of goo.
Re:overstating it a bit? (Score:1)
Re:overstating it a bit? (Score:2)
Whatever. I really don't care if Hibernate or Hibernate's docs are making my skin crawl. I've been programming long enough to know that I'm looking for a thin shim that converts application-level concepts into database actions, and that I want that as a single aspect in my codebase. If the Hibernate folks are telling me that I need a full-bore seven layer burrito [pablotron.org] to use their code, I'd rather write my own CDBI-inspired abstr
Re:overstating it a bit? (Score:1)
Re:overstating it a bit? (Score:2)
I've written about three database abstraction frameworks in the last two years, none of which have had a dependency aside from DBI / database drivers. So it is possible, even if it doesn't scale up to handle every degenerate schema on the planet.
That's fine. What I'm looking for is probably outside the scope of what Hibernate is trying to deliver (or, best case, what the Hibernate docs have chosen to focus on). I can live with tha