Thank you for the responses ;) I realize that my original message was less than comprehensive -- I just wanted to see if there was any low-hanging fruit (e.g. "yes, everyone knows 5.6.0 does this").
The exact error I get is precipitated by calling the Splash::Container->create( {} ) method, inherited from Class::DBI:
Can't locate object method "select_val" via package "DBI::st" at /Libr
+ary/Perl/Class/DBI.pm line 532.
That "select_val" method is supposed to be inherited by Class::DBI from Class::DBI::__::Base from Ima::DBI. But as you will see below, it seems to get broken before inheriting from Ima::DBI.
Here is the exploratory test script I wrote. As background, my class Splash::Container inherits from Splash::Base, which in turn inherits from Class::DBI (in turn, this inherits from Class::DBI::__::Base which inherits from Ima::DBI; it is this final inheritance which seems not to work at all).
#!usr/bin/perl -w
use Class::DBI;
use Splash::Container;
warn "Splash::Container is a Class::DBI=" . ( UNIVERSAL::isa("Splash::
+Container", "Class::DBI") ? "yes" : "no") ;
warn "Splash::Container is an Ima::DBI=" . ( UNIVERSAL::isa("Splash::C
+ontainer", "Ima::DBI") ? "yes" : "no") ;
warn "Class::DBI is a Class::DBI::__::Base=" . ( UNIVERSAL::isa("Class
+::DBI", "Class::DBI::__::Base") ? "yes" : "no") ;
warn "Class::DBI::__::Base is a Ima::DBI=" . ( UNIVERSAL::isa("Class::
+DBI::__::Base", "Ima::DBI") ? "yes" : "no") ;
warn "here are the isas for Class::DBI=" . join ";", @Class::DBI::ISA;
warn "here are the isas for Class::DBI::__::Base=" . join ";", @Class:
+:DBI::__::Base::ISA;
warn "here are the isas for Ima::DBI=" . join ";", @Ima::DBI::ISA;
warn "here is VERSION for Class::DBI=" . $Class::DBI::VERSION;
warn "here is VERSION for Ima::DBI=" . $Ima::DBI::VERSION;
warn "here is VERSION for DBI=" . $DBI::VERSION;
warn "here is VERSION for DBD::Pg=" . $DBD::Pg::VERSION;
1;
On my Linux box with Perl 5.6.1, this gives output as expected:
Splash::Container is a Class::DBI=yes at t/imadbi.pl line 6.
Splash::Container is an Ima::DBI=yes at t/imadbi.pl line 7.
Class::DBI is a Class::DBI::__::Base=yes at t/imadbi.pl line 8.
Class::DBI::__::Base is a Ima::DBI=yes at t/imadbi.pl line 9.
here are the isas for Class::DBI=Class::DBI::__::Base at t/imadbi.pl l
+ine 11.
here are the isas for Class::DBI::__::Base=Class::Data::Inheritable;Cl
+ass::Accessor;Ima::DBI at t/imadbi.pl line 12.
here are the isas for Ima::DBI=Class::WhiteHole;DBI;Class::Data::Inher
+itable at t/imadbi.pl line 13.
here is VERSION for Class::DBI=0.94 at t/imadbi.pl line 15.
here is VERSION for Ima::DBI=0.31 at t/imadbi.pl line 16.
here is VERSION for DBI=1.39 at t/imadbi.pl line 17.
here is VERSION for DBD::Pg=1.22 at t/imadbi.pl line 18.
On my Mac OS X 10.2 box with Perl 5.6.0, however, things seem to break between Class::DBI::__::Base and Ima::DBI, despite the contents of ISA:
Splash::Container is a Class::DBI=yes at t/imadbi.pl line 6.
Splash::Container is an Ima::DBI=no at t/imadbi.pl line 7.
Class::DBI is a Class::DBI::__::Base=yes at t/imadbi.pl line 8.
Class::DBI::__::Base is a Ima::DBI=no at t/imadbi.pl line 9.
here are the isas for Class::DBI=Class::DBI::__::Base at t/imadbi.pl l
+ine 11.
here are the isas for Class::DBI::__::Base=Class::Data::Inheritable;Cl
+ass::Accessor;Ima::DBI at t/imadbi.pl line 12.
here are the isas for Ima::DBI=Class::WhiteHole;DBI;Class::Data::Inher
+itable at t/imadbi.pl line 13.
here is VERSION for Class::DBI=0.95 at t/imadbi.pl line 15.
here is VERSION for Ima::DBI=0.31 at t/imadbi.pl line 16.
here is VERSION for DBI=1.40 at t/imadbi.pl line 17.
here is VERSION for DBD::Pg=1.22 at t/imadbi.pl line 18.
Any thoughts? My current ideas are:
- Class::DBI and DBI minor version differences -- however, the changelogs don't seem to indicate anything I recognize as likely to break stuff.
- Perl minor version difference -- I know that 5.6.0 is supposed to have some mysterious bugs. However, the perldelta561 didn't seem to list any likely culprits, either.
- Mac OS X case-insensitive directory structure causing foobars?
- The name Class::DBI::__::Base might not play nicely with Mac OS X?
Any thoughts you folks have are appreciated.
Best,
Randall
Update: In fact, this seems to be a problem with Class::DBI 0.95 (or with my setup and that version), NOT with the inheritance, because consistently 0.95 breaks on both Mac and Linux and 0.94 works on both (although the discrepancy in the isa(...) remains). |