Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Perl library question



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




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org