develooper Front page | perl.beginners | Postings from February 2002

Re: use lib question

Thread Previous
Jon Molin
February 5, 2002 08:49
Re: use lib question
Message ID:

use BEGIN:
perl -e 'BEGIN {if (`pwd` =~ /some_path/){use lib ("/usr");}else{use lib

i usually unshift @INC but i've heard that's not a good way to do it,
not sure why though.


"Kingsbury, Michael" wrote:
> I want to have two different variable for use lib depending on a cmd line
> switch (one for the production libraries, one for development libraries).
> They exist in different directories.  It appears that it uses the use lib at
> compilation time, rendering an if statement useless.  Anyone have a slick
> way of doing this?
> -mike
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About