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

Please advise all the Unix commands to download Perl modules from CPAN and load them into Solaris 7 Perl 5.8 For example if I wanted to get LWP::Simple loaded into /usr/local/lib/perl5/5.8.0. I need every command such as tar, mkfile and whatever else is needed.

Replies are listed 'Best First'.
Re: Getting modules and tar commands.
by kvale (Monsignor) on Feb 02, 2004 at 11:27 UTC
    Installing modules with CPAN is pretty simple. From the command line:
    % perl -MCPAN -e shell ... initial setup stuff, if needed... cpan> install LWP::Simple
    Assuming that all the tests pass, your module will be installed.

    -Mark

      Thanks but what is the initial setup stuff? And when you install LWP::Simple should I be in the usr/local/lib/perl5 directory???
        The initial setup stuff only needs to be done once the first time you use CPAN. It involves picking a close CPAN server from a list and setting CPAN parameters. It starts up automatically and is self explanatory. Consequent times, CPAN comes up directly with a welcome message and cpan> prompt.

        It is not necessary to go to a particular directory; CPAN will find and install the module in the proper directory. You will want to be superuser when invoking CPAN so that you have permission to write to the /usr subdirectories.

        I encourage you play around with the CPAN interactive shell. It is fun and easy.

        -Mark

Re: Getting modules and tar commands.
by Fletch (Bishop) on Feb 02, 2004 at 13:49 UTC
Re: Getting modules and tar commands.
by z3d (Scribe) on Feb 02, 2004 at 14:37 UTC
    One other caveat I would throw out there, and maybe this is just something funky with our solaris boxes at the office, but we find that the installed modules sometimes need to be chmod'd so that they can be usable (for some reason, things come out 0440 and 0660 - no world permission to, say, load the module ;) ). Other than that, read the faq (http://www.cpan.org/misc/cpan-faq.html)



    "I have never written bad code. There are merely unanticipated features."