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

Re: How to change @INC permanently?

by merlyn (Sage)
on Aug 24, 2005 at 04:11 UTC ( #486085=note: print w/replies, xml ) Need Help??


in reply to How to change @INC permanently?

It's in the binary of /usr/bin/perl. Either recompile Perl, or carefully edit the binary (not necessarily possible if you need to add path items).

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: How to change @INC permanently?
by spiritway (Vicar) on Aug 24, 2005 at 04:18 UTC

    Thank you kindly, Merlin.

      A somewhat simpler approach for a "semi-permanent" solution may be to set the PERL5LIB environment variable to the directories you want to always make available. See perlrun.

      -xdg

      Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

        set the PERL5LIB environment variable
        In my experience, ensuring that an environment variable is set for every possible process that might execute my script is pretty unlikely, not to mention that a setuid script ignores that variable.

        -- Randal L. Schwartz, Perl hacker
        Be sure to read my standard disclaimer if this is a reply.

        He could begin his script with
        #!/usr/bin/perl -mlib=/path

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2023-01-28 07:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?