Front page | perl.beginners |
Postings from February 2002
Re: use lib question
Thread Previous
From:
Jon Molin
Date:
February 5, 2002 08:49
Subject:
Re: use lib question
Message ID:
3C600C76.E06EB044@resfeber.se
use BEGIN:
perl -e 'BEGIN {if (`pwd` =~ /some_path/){use lib ("/usr");}else{use lib
("/home");}}'
i usually unshift @INC but i've heard that's not a good way to do it,
not sure why though.
/Jon
"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: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
Thread Previous