On Monday, January 7, 2002, at 08:29 AM, Tim Bunce wrote:

> Seems like you're creating a whole bunch of duplicate code with
> little reuse.
>
> It would seem better to create a module that implements the concept
> in a more generic way. Perhaps something like:
>
>    use AutoObject class => DBI::db, obj => sub { $main::DBH || 
> $PApp::SQL::DBH };
>

Both a CPAN and a Google search turned up nothing on AutoObject. 
I guess that is meant for example purposes.

> that would import into the current package stubs for all the DBI::db
> methods so they could be used as functions. The stubs would use the
> specified dbh=>... hook code to get the $dbh to use then call the
> corresponding method.

that's a good idea. The only issue is that I have *extended* 
DBI::db with methods that make it easier to use... so I guess, 
assuming that subclassing DBI becomes easier this would be 
possible, but currently, I am steering clear of any 
implementation based on subclassing until the AnyDBD and DBI 
merge is a bit more finalized


>
>> It is available on CPAN as
>> DBIx.... that's right, plain DBIx.
>
> Not a good name really (unlikely to get into the Module List).
>

I have renamed this module SQL::Secretary and will upload it in a 
few hours and then delete DBIx.

Reply via email to