(FYI: AS perl 5.8.3, DBI 1.48, WinXP)

Does DBI subclassing permit/play nice with multiple
inheritance ?

I'm running into an issue attempting to inherit the
set_err/err/errstr/state methods on DBIx::Threaded handles. I initially
attempted to just default to the base class, but that didn't work,
so I've tried overloading to explicitly call the base class methods:

DBIx::Threaded::db::errstr(C:/Perl/site/lib/DBIx/Threaded.pm:903):
903:            return shift->DBI::db::errstr();
  DB<2> s
SV = PVMG(0x39ca0a4) at 0x1d1d8f0
  REFCNT = 1
  FLAGS = (ROK)
  IV = 0
  NV = 0
  RV = 0x24b24b8
  PV = 0x24b24b8 ""
  CUR = 0
  LEN = 0
dbih_getcom handle DBIx::Threaded::db=HASH(0x24b24b8) is not a DBI handle
(has no magic) at C:/Perl/site/lib/DBIx/Threaded.pm line 903.
        DBIx::Threaded::db::errstr('DBIx::Threaded::db=HASH(0x1d766bc)') called
at test.pl line 171


I vaguely recall having a similar issue with DBIx::Chart which was
eventually fixed by just using SUPER::err()/etc. However, that doesn't
seem to be working w/ DBIx::Threaded, and one big difference is
that DBIx::Chart only inherits from DBI). Here's the inheritance
for DBIx::Threaded (this is for the db handle):

use base qw(DBIx::Threaded::common Thread::Queue::Queueable DBI::db);

(I've also tried @ISA = ...)

Is there something else I need to do ?

Dean Arnold
Presicient Corp.

Reply via email to