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

Hi I am using perl 64 bit on Windows 7. My scripts are unable to find the modules referenced and failing.

perl version
This is perl, v5.10.1 built for MSWin32-x64-multi-thread
(with 2 registered patches, see perl -V for more detail)


Ex.
use Net::MySQL ; # this package won't give any error
use DBD::mysql; # this package gives the below error
Can't locate loadable object for module DBD::mysql in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/lib .) at -e line 0 Compilation failed in require. BEGIN failed--compilation aborted.

I am not trying to use both modules at same time. Also both module are installed in a same directory c:\Perl64\lib .
I am also not suspecting any file permission issues.
I tried to add the lib folder to @INC explicitly but no help.

In addition, below command at command promt works!
perldoc DBD::mysql
but perl -MDBD::mysql -e 1 fails with same above error
Many modules are failing with same error while very few succeed. Any help/pointers on this is very appreciated.

-mhk2

Replies are listed 'Best First'.
Re: Perl libs not found in windows
by syphilis (Archbishop) on May 10, 2013 at 03:27 UTC
    Many modules are failing with same error while very few succeed.

    This is often the result of incorrect installation procedure.

    By way of example, if DBD::mysql has been correctly installed then auto/DBD/mysql/mysql.dll should exist in one of the @INC directories that were specified (normally C:/Perl64/site/lib).
    That's the "loadable object" that it's looking for, and the error message you got is telling you that it can find no such file.

    How did you install DBD::mysql ?

    Cheers,
    Rob
Re: Perl libs not found in windows
by NetWallah (Canon) on May 10, 2013 at 03:19 UTC
Re: Perl libs not found in windows
by Anonymous Monk on May 10, 2013 at 04:01 UTC

    This is perl, v5.10.1 built for MSWin32-x64-multi-thread

    That is an old and unsupported one , so I'd check into getting a new one, unless you're paying for support, in which case contact support