On Fri, Jan 04, 2002 at 08:21:22AM -0600, Philip Molter wrote:
> On Thu, Jan 03, 2002 at 01:25:03AM +0000, Tim Bunce wrote:
> 
> :   Simply calling $dbh = MyDBI->connect(...) will be interpreted
> :   as a request to have the $dbh blessed into the MyDBI::db class
> :   (and a $dbh->prepare will return $sth blessed into MyDBI::st).
> :   A warning will be generated if @MyDBI::db::ISA is empty.
> 
> Will it automatically update @MyDBI::db::ISA in the process?

Nope. It'll just ignore the subclass that's been incorrectly setup.
I think it's safer that way.

> What about recognizing multiple levels of inheritance, like:
> 
>   WebDBI -> MyDBI -> DBI
> 
> Will it be smart enough to pick that kind of thing out?

You'd set up that hierarchy yourself as

        WebDBI::db -> MyDBI::db -> DBI::db

and then tell the DBI that you want to use WebDBI as the 'root
class' (umm, perhaps a poor name).

> That would make it a little easier for Apache::DBI to handle DBI
> subclasses, something which isn't impossible now, but is a little
> annoying.

I'm not sure what you mean. Can you expand on that? (re subclassing
Apache::DBI)

Tim.

Reply via email to