joel at fysh.org
Mon Aug 1 12:38:31 CEST 2005
On Mon, Aug 01, 2005 at 01:17:34AM +0100, Matt S Trout wrote:
> Does anybody use this? More importantly, is anybody using it out of choice
> or is it purely being used to get round Class::DBI (or whatever ORM) having
> insufficient flexibility to let you construct the query in an asbtract
> It's part of the Class::DBI API so we need to support it in the compat layer
> at least, but if we're going to abstract away the database layer entirely
> (which is necessary for e.g. Rosetta, let alone something like an LDAP
> backend) I think we should probably only support abstract formats in core,
> primarily SQL::Abstract style as currently and perhaps Tangram style later.
I think it's a handy feature, albeit one which shouldn't be (ab)used
without considering the implications at least twice. Think of it a bit
like the root prompt, or Perl exposing access to object properties
directly rather than *mandating* the use of accessor methods.
That said, I've yet to find something that DBIx::Class can't do in the
brief time I've had to play with it ;)
You might consider making it an optional export, or requiring it to be
passed an error-handling coderef if strict is on, but the former seems
unnecessarily obfuscating and the latter overly nannyish.
More information about the Dbix-class