Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Installing CPAN module using cpan shell

by velusamy (Monk)
on Mar 04, 2009 at 05:36 UTC ( [id://747990]=perlquestion: print w/replies, xml ) Need Help??

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

Dear Monks,

I used cpan shell to install a module. But I don't have root permission to install a module in /usr/local/lib/perl/5.8.8. How to install a module in my own directory using the cpan shell?

Replies are listed 'Best First'.
Re: Installing CPAN module using cpan shell
by lakshmananindia (Chaplain) on Mar 04, 2009 at 05:46 UTC

    I think you can use

    CPANPLUS fetch method.

    The fetch method will download the specified module to the current directory.

      In unix there is a command "cpan" you can use that.
        Since perl 5.009005 there is a command "cpanp" you can use that.
Re: Installing CPAN module using cpan shell
by targetsmart (Curate) on Mar 04, 2009 at 07:23 UTC
    Not a direct answer to your question, cpan shell is always better because it resolves dependencies, but generally i will do like this.
    whenever you install a module you have to give the prefix as your desired directory path
    for example,
    assuming I am downloading warnings::unused from
    http://search.cpan.org/CPAN/authors/id/G/GF/GFUJI/warnings-unused-0.04.tar.gz
    go to the downloaded path and untar the tar ball and run perl Makefile.PL prefix=$HOME make make install make test make clean add the installed directory in $PATH variable man warnings::unused you will get the man page of it but for using this module in your perl program you have to either you -I option of perl interpreter or use lib or add in @INC it will just work fine you can have any number of modules downloaded like this and keep in yo +ur home directory, as long as you have disk space and internet.

    Vivek
    -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
Re: Installing CPAN module using cpan shell
by perlthirst (Scribe) on Mar 04, 2009 at 06:48 UTC
    Refer http://www.perl.com/lpt/a/635
Re: Installing CPAN module using cpan shell
by ig (Vicar) on Mar 04, 2009 at 08:40 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://747990]
Approved by pileofrogs
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-03-28 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found