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

Running Strawberry Perl on a Windows Vista machine.

I am trying to call the Math::Random::MT::Auto module. But when I do, it returns the common error:

Can't locate loadable object for module Math::Random::MT::Auto in @INC

The code I am using is simply

use strict; use warnings; use Math::Random::MT::Auto;

Although I compiled the module after downloading it, I certainly had little idea what I was doing or where it was supposed to go. Anyone able to point me to a previous "Modules 101 for Windows" write up or walkthrough will get my thanks and an unlimited supply of pseudo random numbers. Thanks!

Replies are listed 'Best First'.
Re: Yet Another Unlocatable Loadable Object
by syphilis (Archbishop) on Aug 22, 2010 at 01:22 UTC
    Can't locate loadable object for module Math::Random::MT::Auto in @INC

    The "loadable object" is simply a file called (in this particular case) Auto.dll. It's a file that was built during the compilation.

    After 'dmake install', you (and perl) should be able to find it in:
    C:/strawberry/perl/site/lib/auto/Math/Random/MT/Auto/Auto.dll
    It could, of course, be placed into auto/Math/Random/MT/Auto/Auto.dll within *any* of the @INC directories and still be "locatable" by perl - but the location I've specified above (assuming a standard Strawberry installation) is the place that one would expect to find it.

    Cheers,
    Rob
Re: Yet Another Unlocatable Loadable Object
by ww (Archbishop) on Aug 22, 2010 at 00:08 UTC
    When you feel a question coming on like 'point me to a previous "Modules 101 for Windows" write up or walkthrough,' it's time to check the Tutorials section.

    A second option would be to use Google, restricting the site to PM.

    Third choice (chiefly because either of these imposes a bit of an extra load on PM) would be to use Search or Super Search.

Re: Yet Another Unlocatable Loadable Object
by Anonymous Monk on Aug 21, 2010 at 22:28 UTC
Re: Yet Another Unlocatable Loadable Object
by Anonymous Monk on Aug 22, 2010 at 01:19 UTC
    It works here. I have Strawberry Perl v5.12.0 (32-bit) on Vista (x64).

    First, I installed the module with CPAN: C:\> cpan Math::Random::MT::Auto

    It compiled successfully. Strawberry Perl should come with the tools to do so, but I'm not familiar yet with the 64-bit build. Which are you using?

    Finally, it also seems to run fine with code like the following: C:\> perl -MMath::Random::MT::Auto=rand -lwe "print rand for 1..5"