[Omaha.pm] use lib "$ENV{J}/lib";

Jay Hannah jhannah at omnihotels.com
Fri Dec 9 08:31:19 PST 2005


This is pretty weird, but I got a call from a friend, and yes, indeed,
you can set up @INC via "use lib" using an enfironmental variable...

Is that obscure enough for a Friday morning post to this list? -laugh-

j

$ export J=/tmp
$ cat j.pl
use lib "$ENV{J}/lib";
print join "\n", @INC;
print "\n";

$ perl j.pl
/tmp/lib
/usr/lib/perl5/site_perl/Omni/MVC
/usr/lib/perl5/5.8.7/i686-linux
/usr/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/i686-linux
/usr/local/lib/perl5/site_perl/5.8.7
/usr/local/lib/perl5/site_perl
.


More information about the Omaha-pm mailing list