Perl library question
David Hummel
dhml at comcast.net
Wed Jan 4 13:34:32 EST 2006
On Wed, Jan 04, 2006 at 01:15:59PM -0500, Jerry Feldman wrote:
>
> I have a directory tree:
> /foo/bar/share/bin
> /foo/bar/share/lib
> In a perl script, I have
> use Options;
> Where Options.pm is in /foo/bar/share/lib
> I can solve the problem by adding
> use lib /foo/bar/share/lib;
>
> But, these are standard scripts that I don't really have the authority to
> change. If I don't have the use lib, I get...
> Can't locate Options.pm in @INC (@INC contains:.....)
If you can modify the file that calls the script, you can augment @INC
with the -I flag:
perl -I/foo/bar/share/lib /path/to/script.pl
Otherwise, the person with authority must either modify the scripts to
use lib as you did, or install the referenced modules to one of the
standard @INC locations.
-David
More information about the Discuss
mailing list