Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to change @INC permanently?

by techra (Pilgrim)
on Aug 24, 2005 at 13:57 UTC ( [id://486190]=note: print w/replies, xml ) Need Help??


in reply to How to change @INC permanently?

And yet another solution is to make use of the myriad paths that Perl scans for modules in. </p

Notice that Perl scans /etc/perl by default. Most distributions of Linux don't put anything there, so why not just softlink the directory structure your modules live under into /etc/perl?

Replies are listed 'Best First'.
Re^2: How to change @INC permanently?
by Qiang (Friar) on Aug 24, 2005 at 14:47 UTC
    Notice that Perl scans /etc/perl by default.

    doesn't seem to be the case on my machines. if it were, that might be a nice trick to use.

    on debian perl 5.8.7

    $ perl -e 'print join "\n",@INC' /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4
    on RH perl 5.8.0
    $ perl -e 'print join "\n",@INC' /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
    on solaris perl 5.00503
    > perl -e 'print join "\n",@INC' /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found