[YLUG] PERL5LIB

Roger Leigh rleigh at codelibre.net
Mon Aug 3 21:13:21 UTC 2009


[Please don't top-post!]

On Mon, Aug 03, 2009 at 08:24:48PM +0100, Patrick Dupre wrote:
> >On Mon, Aug 03, 2009 at 02:36:44PM +0100, Patrick Dupre wrote:
> >
> >>I wanted to modify PERL5LIB variable (which is easy) and then
> >>I wanted to it exported when running a new gnome-terminal, but it
> >>appears that ever gnome-terminal reset PERL5LIB to the
> >>original value probably resulting from profile.d/atrpms.sh
> >>
> >>How can I control a lot better the  PERL5LIB environment variable ?
> >
> >As you would for any environment variable, make sure it's exported
> >into the environment in your shell's configuration file.

> You are right, but PERL5LIB does not behave like that !
> I am using bash (or sh), and PERL5LIB is just not exported like the
> other variables, it appears to be resetted by gnome-terminal to a value
> sitting is /etc/profile.d/atrpms.sh (it I understand right).

It's just an environment variable like any other; it's not special in
any way.

gnome-terminal is just a terminal emulator; it does not alter the
shell environment.  Whatever /etc/profile.d/atrpms.sh might be (it's
not present on my system), whether or not it sets PERL5LIB (it
shouldn't be set by default) is irrelevant, you can still overrride it
in your shell configuration.

I use PERL5LIB all the time (I maintain the Debian build infrastructure
in Perl and use this for testing uninstalled Perl library code in my
build tree).  But, like LD_LIBRARY_PATH for shared libraries, you use
it to specifially add to the Perl module search path.  Setting it in
your shell will just work as for any other environment variable.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.lug.org.uk/pipermail/york/attachments/20090803/39c8d75c/attachment.pgp 


More information about the York mailing list