Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: How to change @INC permanently?

by techra (Pilgrim)
on Aug 24, 2005 at 13:57 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2023-02-01 11:58 GMT
Find Nodes?
    Voting Booth?

    No recent polls found