in reply to Why Does My Class::DBI Program Break Under "use diagnostics" Pragma?

Unlike pfaut, i tried your code and it failed in the same manner. I used Class::DBI version 0.93 on two Linux boxes - one with Perl 5.6.0 and the other with 5.6.1. Both failed. One bizarre item that i can't figure out about this is that there is no DBI/dbi.pm file ... DBI::db is sort of automagically created somewhere inside of DBI.pm (note there there is no DBI::db package declaration either). I wonder how pfaut was able to get your code to work ...

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on (jeffa) Re: Why Does My Class::DBI Program Break Under "use diagnostics" Pragma?

Replies are listed 'Best First'.
Re: (jeffa) Re: Why Does My Class::DBI Program Break Under "use diagnostics" Pragma?
by pfaut (Priest) on Jul 12, 2003 at 18:59 UTC

    I looked at %INC after the program got started and dumped versions. Here's what I got. The code:

    #!/usr/bin/perl use strict; use diagnostics; use lib "."; use MyTable; print <<"END"; Exporter = $Exporter::VERSION Carp = $Carp::VERSION XSLoader = $XSLoader::VERSION Class::DBI::Query = $Class::DBI::Query::VERSION DynaLoader = $DynaLoader::VERSION lib = $lib::VERSION Class::Trigger = $Class::Trigger::VERSION Exporter::Heavy = $Exporter::Heavy::VERSION DBI = $DBI::VERSION Class::WhiteHole = $Class::WhiteHole::VERSION MyDatabase = $MyDatabase::VERSION constant = $constant::VERSION Class::DBI::ColumnGrouper = $Class::DBI::ColumnGrouper::VERSION strict = $strict::VERSION diagnostics = $diagnostics::VERSION base = $base::VERSION vars = $vars::VERSION Config = $Config::VERSION warnings::register = $warnings::register::VERSION warnings = $warnings::VERSION Class::Data::Inheritable = $Class::Data::Inheritable::VERSION Ima::DBI = $Ima::DBI::VERSION Class::Accessor = $Class::Accessor::VERSION MyTable = $MyTable::VERSION Class::DBI = $Class::DBI::VERSION overload = $overload::VERSION AutoLoader = $AutoLoader::VERSION Data::Dumper = $Data::Dumper::VERSION END

    The output:

    Exporter = 5.562 Carp = XSLoader = 0.01 Class::DBI::Query = DynaLoader = 1.04 lib = 0.5564 Class::Trigger = 0.08 Exporter::Heavy = DBI = 1.32 Class::WhiteHole = 0.03 MyDatabase = -1, set by base.pm constant = 1.02 Class::DBI::ColumnGrouper = strict = 1.01 diagnostics = base = 1.98 vars = Config = warnings::register = warnings = Class::Data::Inheritable = 0.02 Ima::DBI = 0.28 Class::Accessor = 0.17 MyTable = Class::DBI = 0.91 overload = AutoLoader = 5.58 Data::Dumper = 2.102
    90% of every Perl application is already written.
    dragonchild
Re: (jeffa) Re: Why Does My Class::DBI Program Break Under "use diagnostics" Pragma?
by Wally Hartshorn (Hermit) on Jul 14, 2003 at 20:24 UTC

    Well, I'm still not sure what the cause was, but I figured out how to fix it -- upgrade to Perl 5.8.0. :-) I had been using Perl 5.6.1 and Class::DBI 0.92. Switching to Perl 5.8.0 made the problem go away. I don't know if I just had some weirdness in my configuration or if it was an odd conflict between 5.6.1 and 0.92. In any case, it works now and I'm tired of struggling with it.

    Weird. And one of the biggest time-sucks I've ever had the misfortune to get pulled into. :-(

    Thanks for verifying that I wasn't 100% nuts!

    Wally Hartshorn

    (Plug: Visit JavaJunkies, PerlMonks for Java)