> [From DBI->connect()]
> 
>     # XXX this is inelegant but practical in the short term, sigh.
>     if ($installed_rootclass{$class}) {
>         $dbh->{RootClass} = $class;
>         bless $dbh => $class.'::db';
>         my ($outer, $inner) = DBI::_handles($dbh);
>         bless $inner => $class.'::db';
>     }
> 
> It works, but to quote Tim Bunce there... *sigh*.
> 
> So anyhow, yes, this is a big, icky problem.

I wonder if this problem couldn't be solved with a proper combination of
@ISA, SUPER::, NEXT::, and use delegation? (calling Damian... :-)

   http://dev.perl.org/rfc/190.pod  (NEXT:: pseudoclass)
   http://dev.perl.org/rfc/193.pod  (use delegation)

Or perhaps a @HASA array or a better way of specifying multiple
inheritance than a serial @ISA array are needed. Perhaps we need
something as flexible as use delegation for inheritance?

   use inheritance parent => DBI;
   {
       use inheritance parent => DBI::db;
       SUPER->do_stuff;
   }
   use inheritance peer => DBI::st

That's just braindump, and I'm not sure what it even means, but figured
I'd write it down before I forgot.

-Nate

Reply via email to