use lib question

2002-02-05 Thread Kingsbury, Michael
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

Re: use lib question

2002-02-05 Thread Jon Molin
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

RE: use lib question

2002-02-05 Thread Bob Showalter
-Original Message- From: Kingsbury, Michael [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 11:31 AM To: '[EMAIL PROTECTED]' Subject: use lib question I want to have two different variable for use lib depending on a cmd line switch (one for the production

Re: use lib question

2002-02-05 Thread Jeff 'japhy' Pinyan
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

Re: use lib question

2002-02-05 Thread Brett W. McCoy
On Tue, 5 Feb 2002, 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,

Re: use lib question

2002-02-05 Thread Randal L. Schwartz
Jeff == Jeff 'Japhy' Pinyan [EMAIL PROTECTED] writes: Jeff use lib $ARGV[0] eq '-foo' ? /this/path : /that/path; I don't believe @ARGV is set up early enough to do that. I'd be happy if that worked, but I'm suspicious. Have you tested this? -- Randal L. Schwartz - Stonehenge Consulting

Re: use lib question

2002-02-05 Thread Jeff 'japhy' Pinyan
On Feb 5, Randal L. Schwartz said: Jeff == Jeff 'Japhy' Pinyan [EMAIL PROTECTED] writes: Jeff use lib $ARGV[0] eq '-foo' ? /this/path : /that/path; I don't believe @ARGV is set up early enough to do that. I'd be happy if that worked, but I'm suspicious. Have you tested this? japhy%

Re: use lib question

2002-02-05 Thread Randal L. Schwartz
Jeff == Jeff 'japhy' Pinyan [EMAIL PROTECTED] writes: I don't believe @ARGV is set up early enough to do that. I'd be happy if that worked, but I'm suspicious. Have you tested this? Jeff japhy% bleadperl -le 'BEGIN { print @ARGV }' a b c Jeff a b c I sit corrected. :) -- Randal L.