I appologize. I wasn't terribly clear. I was hoping for suggestions as to what name would be appropriate - I'm quite well aware that the names I have are bad.

David Landgren wrote:
David Golden wrote:
Jim Schneider wrote:
-<snip>-
I think you may be best if you come up with your own DBIx::* name that captures what you feel is distinctive about your module -- beyond it just being "simple".

Seconded. Simple modules never are. I'm not trying to be flippant. If the documentation isn't equally simple (for instance, fits on a screenful with no additional provisos or exceptions) then the person using it spends as much time learning how to use it as a supposedly more "complex" module.

Here are the biggest difference between Class::DBI and my module:
1) You don't subclass my module - the necessary subclasses are built on the fly. 2) Collections of tables are described by data structures, and these structures are passed to the module at "use" time, as contrasted to a subclass calling a bunch of methods in the parent class to establish what a table looks like.

For example, if you have a PERSON table (with PERSON_ID, NAME, ADDRESS_ID, and EMAIL columns), and an ADDRESS table (with ADDRESS_ID, LINE1, LINE2, CITY, STATE, ZIP columns (sorry for the USA-centric example)), your "use" clause would look something like this:

use DBIx::Class::Simple ( {
       schema => 'example',
       tables => [
           { table => 'person',
               columns => [
                   { name => 'person_id' }, { name => 'name', },
                   { name => 'address_id' }, { name => 'email' }, ], },
           { table => 'address',
               columns => [
                   { name => 'address_id', }, { name => 'line1', },
                   { name => 'line2', }, { name => 'city', },
                   { name => 'state', }, { name => 'zip', }, ], }, ], }, );

(I've compressed the example a bit to save space).

Once you've used the module, you can say:

my $db = DBIx::Class::Simple->new(handle => $dbh); # $dbh is a DBI handle

And later on:

$schema = $db->example;
$ptable = $schema->person;
@people = $ptable->search(@criteria)

Any suggestions on what to call this beast would be appreciated.
-<snip>-
Discussion of the other modules has been moved to separate threads.

Reply via email to