[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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
.