RE: modifying @INC permanently




Win32 changes to the environment from within your script won't be
permanent, so that won't work unless you do the system call that sets
the environment variable permanently (and also the local one, because it
won't reflect the changes to the system call until it is invoked again).

Do you have the ability to install modules on your clients? The
SetEnvVar function from Win32::AdminMisc will do what you want.

http://www.roth.net/perl/adminmisc/#SetEnvVar

You can install it via PPM from the repository
http://www.roth.net/perl/packages.


Really, though, I think I remember that it's better to 'use lib' than
change @INC. Someone here might be better able to explain why.



-----Original Message-----
From: ettinger@xxxxxxxxx [mailto:ettinger@xxxxxxxxx] On Behalf Of
Anthony Ettinger
Sent: Thursday, June 08, 2006 1:40 PM
To: Perl Beginners
Subject: modifying @INC permanently

Is there a way to modify @INC for the perl installation as a whole?

All my scripts have logic to push the same directory to @INC. It's
rather repetative.

I know I can export PERL_LIB environment variable, but I need
something for all system users (including win32).



--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx
For additional commands, e-mail: beginners-help@xxxxxxxx
<http://learn.perl.org/> <http://learn.perl.org/first-response>



.



Relevant Pages

  • my educational path wont induce before I apply it
    ... bomber were instructing in view of the permanent trap. ... install me enforcing by way of your shy window. ... unfortunately than withdraw with George's advisory relationship. ...
    (rec.games.roguelike.nethack)
  • Re: How to install apps on to the wince device
    ... permanently install these third-party apps? ... To install them permanently you should have a persistent file system and a permanent registry. ... Booting using loadcepc requires DOS and this mean paying a MS-DOS license and giving the end-users a chance to stop the OS boot and accessing the filesystem. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Installing NETCF on an embedded board with win CE 4.1
    ... You'll have to ask the device OEM how to make it permanent. ... > assemblies missing from the \Windows folder? ... Is there a way to install it permanently. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Word 97 question
    ... put the install discs back in, let it do a repair and whatever it did, it ... do it and make it permanent 'cause it works on Rae's Word 97 and Word ... permanent fix--only for that session. ...
    (sci.med.transcription)
  • Re: Specifying additional mount options
    ... Think that only script will help. ... is not really recommended using cio option in /etc/filesystems ... Blazej Antczak ... making it permanent, so that the option will be used when the filesystem is ...
    (AIX-L)