in reply to Class::DBI::Loader problems

If you notice, there is a a problem with the vendor supplied version of Class::DBI::Loader::Mysql, it is complaining becuase it cannot compile it for some reason.

Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Class/DBI/Loader/mysql.pm line 8.

You can try moving that module (rename it with .old tacked on the end of it) and then reinstalling the via CPAN. There might be other issues that you don't know about with other modules though; you will not find out until you try.

Replies are listed 'Best First'.
Re^2: Class::DBI::Loader problems
by rlb3 (Deacon) on Apr 12, 2006 at 16:43 UTC
    I've tried all of the suggestions but no dice. Here are a few things I've noticed because of your questions.

    If I type perl -MClass::DBI::Loader::mysql -e 1 I get:

    Can't locate object method "set_sql" via package "Class::DBI::mysql" a +t /usr/lib/perl5/site_perl/5.8.8/Class/DBI/mysql.pm line 58. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/Class/ +DBI/Loader/mysql.pm line 8. Compilation failed in require. BEGIN failed--compilation aborted.

    And if I type perl -MClass::DBI::mysql -e 1 I get no errors at all. I've even reinstalled DBD::mysql. I appreciate all the help I have recived so far.

      I find this very very odd, but try adding a 'use Class::DBI;' call in the main script that you are calling Class::DBI::Loader from.

      From what I can tell, Class::DBI::mysql's call to use base 'Class::DBI' isn't use()ing Class::DBI at all -- but I thought use base was anologous to use()ing the module and then setting @ISA appropriately.

      I might just release a new Class-DBI-Loader distro with a use Class::DBI call up front

        You win the prize! My use statements looks like:

        use strict; use warnings; use Data::Dumper; use Class::DBI; use Class::DBI::Loader;

        And now everything works fine. Is this a bug should someone be notified?

        Thanks,

      If you are using CPAN or PPM, you can trying seeing a report of updatable modules. Maybe you can see if there are some Class::DBI modules that can be "updated".