Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Personal library with CPAN

by monkfan (Curate)
on Apr 05, 2005 at 10:28 UTC ( #444922=note: print w/ replies, xml ) Need Help??


in reply to Re: Personal library with CPAN
in thread Personal library with CPAN

Hi Zaxo,
The lists of command you provided works great. The really nice things about that set-up is that:

1. You can call the module without having to invoke the standard "use lib" command.
2. You can call the perldoc of the modules installed locally from anywhere.

All these happen JUST as it was installed internally as ROOT! It's incredible.
Would you mind explain which part of the command above that does that? I can somehow guess, but not sure.

Regards,
Edward


Comment on Re^2: Personal library with CPAN
Re^3: Personal library with CPAN
by Zaxo (Archbishop) on Apr 05, 2005 at 13:07 UTC

    Line seven sets and exports the environment variable PERL5LIB in the bash login shell configuration. That is the part which tells Perl where else to look for modules. Technically, Perl adds the path in $PERL5LIB to @INC. The perlrun and perlvar docs tell all.

    The following line sources ~/.bash_profile in the current shell so that Perl has the benefit of PERL5LIB right away. That amounts to rereading the shell config.

    That may fail to influence a web server's Perl environment. If it does, you can use the SetEnv directive in .htaccess or the server configuration for regular cgi scripts. I think PerlSetEnv should work for mod_perl, but mod_perl usually implies enough control that a private perl lib is unnecessary, so I've never tried that setup.

    After Compline,
    Zaxo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://444922]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (19)
As of 2014-10-01 19:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (35 votes), past polls