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

I have a solaris box that has a perl installed by someone else on it. It might be Sun's or it might be a freeware pre-compile. I can not tell.

It's version 5.00503.

There is no Net::FTP installed.

I went to install it using 'perl -MCPAN -e shell' install Bundle::libnet.

That started a download and install of perl5.8.

How can I constrain the CPAN code to just get the modules without trying to rebuild and re-install Perl itself?

  • Comment on using CPAN to install against older PERL

Replies are listed 'Best First'.
Re: using CPAN to install against older Perl (upgrade CPAN.pm)
by grinder (Bishop) on Mar 15, 2003 at 14:22 UTC

    This is usually caused by an out-of-date CPAN.pm module. Upgrade it first and then you should be able to install whatever else you want, without it insisting on recompiling the universe.

    For instance, I should upgrade my version of CPAN. When I ask it to fetch a module it prints out:

    There's a new CPAN.pm version (v1.70) available! [Current version is v1.63] You might want to try install Bundle::CPAN reload cpan without quitting the current session. It should be a seamless upgrad +e while we are running...

    Try doing what it says, and you'll probably find that the problem goes away.

    Oh, and it's Perl, not PERL.


    print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'
Re: using CPAN to install against older PERL
by tall_man (Parson) on Mar 15, 2003 at 04:52 UTC
    You can tell the CPAN module not to follow prerequisites, or to follow them only with your approval. Unfortunately Bundle::libnet has a long list of dependencies. I don't know which one of them would cause a load of 5.8.

    It might be helpful to make a local mirror of CPAN and put that in your urllist, so that you won't have to have Net::FTP to get going.

      If I am not mistaken, the Socket and IO::Socket modules are the 5.8 dependencies.


      cp
      ---
      "Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."
Re: using CPAN to install against older PERL
by Aristotle (Chancellor) on Mar 16, 2003 at 00:09 UTC
    As grinder says, this is caused by old versions of CPAN. If I'm reading the docs right, perl -MCPAN -e'$CPAN::Config->{prerequisites_policy}="ignore"; install CPAN' should do the trick by upgrading the CPAN module ignoring its dependencies. The newer module should then ignore the new version of Perl.

    Makeshifts last the longest.

Re: using CPAN to install against older PERL
by JSchmitz (Canon) on Mar 16, 2003 at 23:16 UTC
    You don't need to use the CPAN shell to install Net::Telnet you can just download the module from cpan manually then unzip, untar and run:

    Configure.PL
    make
    make test
    make install

    sometimes this method can be less of a hassle. You might want to look into installing CPANPLUS

    cheers,

    Jeffery