Re: How do I specify @INC during CPAN module installation?



"ethandbrown@xxxxxxxxx" <ethandbrown@xxxxxxxxx> writes:

I'd like to cleanly install the most current set of modules in my own
account space, but I'm not sure how to tell the CPAN module to consider
only my module path during its builds so that the newest dependent
modules are also installed (and the system modules are ignored). In my
own programs I can just set:

@INC = ("/home/myaccount/myperllibs/lib");

but I'm unclear as to how to do this while running "perl -MCPAN -e
shell"

You can prepend to @INC with the -I switch, like this:

perl -I/home/myaccount/myperllibs/lib -MCPAN -e shell

You could also set the PERL5LIB environment variable. The syntax for that
is dependent on the shell you're using - for bash it would be:

export PERL5LIB=/home/myaccount/myperllibs/lib

Have a look at "perldoc perlrun" for details.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
.



Relevant Pages

  • Re: question about cpan module
    ... inside the shell, how can have the function like 'less' ... I can change the value of the 'pager' entry to whatever ... Web Hosting by West Virginians, ... Cocoa programming in Perl: http://camelbones.sourceforge.net ...
    (comp.lang.perl.misc)
  • Re: Performance on udp socket
    ... (UDP 150 byte) ... The software is radiator (perl), and it seems not to be dependent on CPU speed. ...
    (freebsd-performance)
  • Re: perl to fortran thoughts
    ... matter of them being dependent upon the ill-designed fortran script without ... offered data by parsing the name/value pairs; ... But there's a chance Perl does the job right. ...
    (comp.lang.perl.misc)
  • Re: Console oriented linux distro
    ... > Alan Connor wrote: ... >> However, Debian has some stuff that is dependent on Perl, and ...
    (comp.os.linux.misc)
  • Re: perls severe lack of in-line comment ability
    ... > It seems perl might be in need of a new operator c, modeled on q, ... (note the inserted newline). ... this may be OS dependent; ... trurl:~>echo 'left1 right1 ...
    (comp.lang.perl.misc)