Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot use /usr/local/lib! What to do? 1

Status
Not open for further replies.

netman4u

Technical User
Mar 16, 2005
176
US
Hello all,

I have just been informed that at this site I cannot install any libraries or modules n production systems under the /usr directory. I have been told that folks before have modified the Makefile.PL for the modules to specify a different directory such as one created under /opt/app.

My question is are there any "gotchas" with this? Do I need to make extensive use of the:

Code:
use lib

to facilitate this?

Any help is appriciated.

Nick

If at first you don't succeed, don't try skydiving.
 
Sounds like the ticket.

- Kevin, perl coder unexceptional!
 
Am I missing something here?

I have this little program:

Code:
#!/usr/local/bin/perl 
use lib "/opt/app/CLI_DAE/lib/Net-Ping-2.31/lib/Net";
use lib "/opt/app/CLI_DAE/lib/Net-Ping-2.31/blib/lib/Net";
use lib "/opt/app/CLI_DAE/lib/Net-Ping-2.31/Net-Ping-2.31/lib/Net";
use Net::Ping;

I know for a fact that Ping.pm resides in all the directories in my use statements yet perl still tells me it can't find Net/Ping.pm in @INC!

If at first you don't succeed, don't try skydiving.
 
Don't put Net in the lib path:
Code:
use lib "/opt/app/CLI_DAE/lib/Net-Ping-2.31/lib";
use Net::Ping;
The "use" statement tells it to look in the @INC directories for Net/Ping.pm
 
Thanks ishnid that did it! I have been banging my head against this for a good 12 hours now and I just needed to drop the "Net".

Perl is making me grey and bald before my time!

If at first you don't succeed, don't try skydiving.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top