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/lib/perl/5.6.1
/usr/local/share/perl/5.6.1
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.6.1
/usr/share/perl/5.6.1
/usr/local/lib/site_perl
/usr/lib/perl5/5.6
/usr/lib/perl5/5.005
.
Perhaps when you tested it you declared $lib within the block, e.g.
BEGIN { our $lib = "foo" }
That will cause the use lib to fail, provided you're under use strict,
because the declaration has gone out of scope.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]