On Thu, Mar 07, 2002 at 05:22:09PM -0500, Nikola Janceski wrote:
> nope that doesn't work.. tried it.
> it doesn't like that you are passing use lib a var
It doesn't?
> perl -wle 'BEGIN { $lib = "foo" } use lib $lib; $, = "\n"; print @INC;'
foo
/home/mfowler/perl5lib
/usr/local/
gner-David [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 3:54 PM
To: 'Carl Schoeneman'; [EMAIL PROTECTED]
Subject: RE: Empty compile time value given to use lib
You might be able to block the code with warnings within the block
and then when it hits the end of the block,
From: "Carl Schoeneman" <[EMAIL PROTECTED]>
> I'm using "use lib" dynamically:
>
> $script_dir = get_lib();
> use lib "$script_dir";
>
> This works but generates the warning "Empty compile time value given
> to use lib." Is there any way to supress this message without
o:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 1:03 PM
To: Carl Schoeneman
Cc: [EMAIL PROTECTED]
Subject: Re: Empty compile time value given to use lib
On Mar 7, Carl Schoeneman said:
>I'm using "use lib" dynamically:
>
>$script_dir = get_lib();
>use lib "$sc
On Mar 7, Carl Schoeneman said:
>I'm using "use lib" dynamically:
>
>$script_dir = get_lib();
>use lib "$script_dir";
>
>This works but generates the warning "Empty compile time value given to use
>lib." Is there any way to supress this message without disabling warnings
>entirely?
No,
You might be able to block the code with warnings within the block and then
when it hits the end of the block, it will return to it's prior state.
Wags ;)
-Original Message-
From: Carl Schoeneman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 11:28
To: [EMAIL PROTECTE
This will work.. but you probably can't use it for a subroutine call
returning the $libdir.
BEGIN {
our @INC;
my $libdir = "/libpath";
unshift(@INC, $libdir)
}
-Original Message-
From: Carl Schoeneman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 07, 2002 2:28 PM
To: [EMAIL PROTECTE