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

Hi monks

How do i load and set up CPAN shell on a linux system to install Net::SSH::Perl module

Thanks

Nalina

Replies are listed 'Best First'.
Re: How to set up CPAN shell
by Zaxo (Archbishop) on Jun 10, 2004 at 06:04 UTC

    At the command prompt, as root, type perl -MCPAN -e shell. If you have never run CPAN.pm before you will be prompted for configuration information. The defaults are usually good. That will do CPAN installations system-wide. If you're dissatisfied with the configuration, the CPAN shell command o conf init will let you try again.

    If you can't be root or you want a playground for testing, you'll want a private CPAN setup for your home directory. I gave detailed instructions for setting that up in Re: Personal library with CPAN.

    Once in the shell, the '?' command will give a command summary,

    After Compline,
    Zaxo

      Thanks for ur reply

      It works fine. I downloaded Net::SSH::Perl module after entering to shell with 'get Net::SSH::Perl' command. But how do i install it now?

      I tried perl makefile.pl, but perl command is not getting recognised in the shell. What do I do now?

      Nalina

        In the CPAN shell: cpan> install Net::SSH::Perl Like I said, the ? command gives a summary for using the shell, and perldoc CPAN has everything about it.

        After Compline,
        Zaxo

        You can access the source tree through a normal shell by looking in ~/.cpan/build and installing from there. A more convenient way to do it is to type install Net::SSH::Perl at the cpan shell, which will download and install automatically.


        Roses are red, violets are blue. All my base, are belong to you.
Re: How to set up CPAN shell
by eXile (Priest) on Jun 10, 2004 at 06:52 UTC
    Hi, I know that my FreeBSD system also has a 'cpan' script that basically is a wrapper around the CPAN module. It's location is /usr/local/bin/cpan. On other machines that didn't have this, I did use an UNIX-style alias like:
    alias cpan='perl -MCPAN -eshell'
    that saves some typing
Re: How to set up CPAN shell
by drewbie (Chaplain) on Jun 11, 2004 at 03:28 UTC
    You might also want to take a look at the CPANPLUS module. It has a compatibility mode for CPAN.pm, plus it does a whole lot more like automatically reporting test to CPAN testers. The docs mention that it is scheduled to take over CPAN.pm's duties in 5.10 so the time spent learning anything new will not be wasted.

    And it's invoked nearly identically to CPAN:

    perl -MCPANPLUS -e 'shell'