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

Re: use lib question

Thread Previous | Thread Next
Jeff 'japhy' Pinyan
February 5, 2002 09:01
Re: use lib question
Message ID:
On Feb 5, Kingsbury, Michael said:

>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?

  use lib $ARGV[0] eq '-foo' ? "/this/path" : "/that/path";

Jeff "japhy" Pinyan
RPI Acacia brother #734
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.

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