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

Hello

I am trying to install a module in C:\lib directory and specified the following option:-

perl makefile.pl PREFIX=C:\lib LIB=C:\lib (as explained in the tutorial pages) but I get the following error:-

C:\downloads\Tie-Autotie-0.01>perl makefile.pl PREFIX=C:\lib LIB=C:\li +b Warning: prerequisite Tie::IxHash failed to load: Can't locate Tie/IxH +ash.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at (eval 4) line +3. Writing Makefile for Tie::Autotie

I am not sure as to why @INC is not picking up the C:\lib path as I have already installed Tie\IxHash.pm in C:\lib directory.

Please advice

Replies are listed 'Best First'.
Re: Prerequisite warning while installing a module in windows
by Tanktalus (Canon) on Jun 25, 2006 at 22:19 UTC

    This is kinda what PERL5LIB is for. Kinda. But it is useful for this - I do something very similar in automatically installing a bunch of modules during a build process - but they get installed into the build tree. So my script just sets PERL5LIB to include the lib directory I'm installing to, and then sets PREFIX and LIB, or --install_base, depending on whether it's a Makefile.PL or Build.PL-based distribution, and then prereqs are found.

    In your case, you may want to just set PERL5LIB=C:\lib in your system environment, start a new shell, and then work from there. (Maybe - I can't completely tell why you're using a local install path, there are so many reasons why you might be doing this.)

    Good luck.

Re: Prerequisite warning while installing a module in windows
by Anonymous Monk on Jun 25, 2006 at 21:22 UTC

    Update:

    I included BEGIN { push @INC, 'C:\lib' }; in Makefile.pl and it worked!!

    But, I expected C:\lib path to be icluded to @INC when I said

    perl makefile.pl PREFIX=C:\lib LIB=C:\lib ?

    Am I missing something here?

Re: Prerequisite warning while installing a module in windows
by shmem (Chancellor) on Jun 26, 2006 at 06:53 UTC
    Maybe perl -Mlib=C:\lib makefile.pl PREFIX=C:\lib LIB=C:\lib ?

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}