Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Recently installed MySQL, works fine from the command line.
 
Had problems with installation of Msql-Mysql-modules-1.2215:
  1. Could not find loadable object (I fixed this by copying DBI.so into the path).
  2. Can't locate auto/DBI/prepare.al (and any other method that is called, except for connect). This one is giving me problems.
 
Here I am speculating:
I looked in the Makefile generated by make Makefile.PL. It looks like the autosplit routine is responsible for breaking up the mysql.pm into '.al' pieces? These pieces are missing (find / -name *.al returns only POSIX .al things). No warning is given by make that things are missing.  
I tried breaking up mysql.pm manually (as one would make .pm files). The test program connects to the database but "hangs" indefinitely on the prepare statement.
 
When perl things work, they work very well, so please help me determine what I did wrong!
 
A small question: Why break things into .als? For speed on loading? Could the programs be written to look for the .pm if the .al cannot be found?
 
Thanks!
Gary
  • Comment on MySQL DBI - Can't locate auto/DBI/prepare.al

Replies are listed 'Best First'.
(tye)Re: MySQL DBI - Can't locate auto/DBI/prepare.al
by tye (Sage) on Mar 30, 2001 at 03:37 UTC

    "Can't locate foo/bar.al" just means that the "foo" module doesn't provide a method called "bar" and the d*** AUTOLOAD code is stupid (a pet peeve).

    You aren't missing any files. Someone is trying to use the wrong method on the wrong type of object.

            - tye (but my friends call me "Tye")
Re: MySQL DBI - Can't locate auto/DBI/prepare.al
by Masem (Monsignor) on Mar 30, 2001 at 03:25 UTC
    Msql-Mysql-Modules does NOT provide the DBI interface for perl; instead, it uses it's own builtin version. (At least, last time I used that, this was the case).

    If you want the DBI functionality, you want to install DBD::Mysql, as well as the DBI support modules.

    (Note, I'm pretty sure that M-My-m is what I'm thinking it is, as that's a typical name of the RPM/deb that is sent along with Mysql updates).


    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
Re: MySQL DBI - Can't locate auto/DBI/prepare.al
by gary kuipers (Beadle) on Mar 31, 2001 at 23:52 UTC
    I finally figured out why I was getting the .al error based on help from Tobias :
    I had a line for connect: $dbh = connect ...
    and a prepare that says $dbh = DBI->prepare(...
    Duh!
    it should say $sth = $dbh->prepare( ...
    Thanks for your help!
      thank you , thank you , thank you x 10000000000 times