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, it does not "work". $script_dir is undef at compile-time.
$script_dir = get_lib();
doesn't happen until run-time. Solution:
sub get_lib { ... }
use lib get_lib();
or:
sub get_lib { ... }
BEGIN { $script_dir = get_lib(); }
use lib $script_dir;
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]