in reply to Re: Re (tilly) 1: Apache::DBI and DBI subclasses
in thread Apache::DBI and DBI subclasses

Well, whether this is doable depends on what you wanted to do. But Perl does have multiple inheritance. You can choose to inherit directly from Apache::DBI and then directly from DBI. So you are a subclass of both, and if Apache::DBI isn't there things still have a chance to work. I say chance because if Apache::DBI and DBI do something differently enough, you might have to work around the difference.

Another approach is to reconsider doing any subclassing. What you want to do is preserve the interface, right? Well you can have an object that has an attribute which is the database handle it proxies through with an AUTOLOAD method. You can see an example of how to do that at Re (tilly) 1: Reverse Inheritance Irritance. And now you can wrap either one of them without having to do a lot of work...

  • Comment on Re (tilly) 3: Apache::DBI and DBI subclasses