On Tue, Jan 08, 2002 at 03:25:30AM -0500, Terrence Brannon wrote:
>
> 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.
Yes, I was kind'a hoping you'd write it :)
Though perhaps FunctionMethods would be a better name.
> > 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...
The AutoObject thingy would search the package for methods
and then itterate up through the @ISA packages to find all
possible methods.
> 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
I doubt it'll change significantly from what I described in my
big email.
> >> 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.
Umm, the name isn't very descriptive, but we can discuss that on
the [EMAIL PROTECTED] list.
Tim.