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

Hi Monks,
I had to install the module Test::Simple on Unix machine, so I downloaded it from CPAN and tried to install it. When I gave the command "perl Makefile.PL", the following warning appeared "Warning: prerequisite Test::Harness 2.03 not found at /opt/perl/lib/5.6.1/ExtUtils/MakeMaker.pm line 3.". So, now I downloaded the Test::Harness 2.47_03 from CPAN and successfully installed it on the Unix machine. Since, I do not had permission to install the modules, I installed the Test::Harness 2.47_03 on the ~/lib directory. Now, I again tried to make the Test::Simple module by giving the command "perl Makefile.PL PREFIX=~/lib LIB=~/lib", it again gave me the same error as before.
How can I resolve this? Do I need to specifically install version 2.03 of Test::Harness or is there any other problem. Please help, I have to install other perl modules also in ~/lib directory only.
Thanks
Akhil
  • Comment on Problem in installation of a Perl Module

Replies are listed 'Best First'.
Re: Problem in installation of a Perl Module
by InfiniteLoop (Hermit) on Mar 31, 2005 at 07:04 UTC
    just do this, in your shell (I assume bash):
    export PERL5LIB=~/lib
    and then do the perl Makefile.PL
Re: Problem in installation of a Perl Module
by monkfan (Curate) on Mar 31, 2005 at 07:03 UTC
    Use CPAN Shell (can be as root or client)
    $ perl -MCPAN -e 'shell'
    You will be prompted to specify or confirm the location you want to install your module.
    This will most probably be : "home/yourname/perl"
    Then do this:
    CPAN> install Module::Name
    It'll do everything for you.

    Then you call the module from your script like this:
    #!/usr/bin/perl -w use lib "/home/yourname/perl"; use Module::Name;
    Regards,
    Edward