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.
Re: Ask use.perl.org - Class Tree + Driver API ? (Score:1)
Hi Alias,
I don't know if I understood completely what you are trying to accomplish, but I think I have developed a similar system, that is used to access different data sources (txt, ftp, http, sql, AS/400, ...) with a single interface.
Sql class in particular has the behaviour you mention, in that it supports Postgres, Mysql, Oracle, DB2, Sybase, Informix, ...
In my case, I have a "Driver" class with many subclasses like Pg, Oracle, Sybase, MSSQL, ... that are embedded in a $self->{driver} membe
DBIx::Class (Score:1)
where I don't know how to write the "mumble" part off the top of my head, but it's probably acc
Re: (Score:1)
It solves the problem by getting rid of the class tree altogether and using Perl structures.
Here's another example of the sort of stuff I'm doing.
# We need a certain type of person
my $query = MyApp::Entity::Person->Fetch;
$query->condition('OptimizedFor', '==', 'fun');
$query->condition(
MyApp::SQL::Collection->OR(
MyApp::SQL::Clause->new('Lame', 'is null'),
Re: (Score:1)
But you get the point.