in reply to Can't locate DBD/Mysql.pm in @INC

Can't locate DBD/Mysql.pm in @INC
It seems like you use Mysql instead of mysql somewhere in your perltest.pl code (notice the uppercase "M"). Can you show us a relevant snippet of your perltest.pl file?

DBD::mysql shows code like:

use DBI; my $dbh = DBI->connect('DBI:mysql:database=foo');
That does not give me the error you get. But, if I change it to:
use DBI; my $dbh = DBI->connect('DBI:Mysql:database=foo');
I do get the error you get.

Replies are listed 'Best First'.
Re^2: Can't locate DBD/Mysql.pm in @INC
by davido (Cardinal) on Jun 13, 2011 at 20:18 UTC

    This error message is also dependent on the operating system. If you're on an OS where filenames are case sensitive, the message will be that the module cannot be found in @INC. If the OS does not treat filenames with case sensitivity, the error message will report that the "object method 'driver'" cannot be found. The reason for the nuance should be fairly obvious, but I found it amusing anyway.

    On Linux, for example, the failure occurs when DBD::Mysql cannot be found. On Windows the DBD::mysql is found as DBD::Mysql, but the object method 'driver' cannot be found in reference to Mysql, because what goes on within the code is case sensitive.


    Dave