Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: To "use" expected version of .pm file

by Taulmarill (Deacon)
on Nov 27, 2008 at 10:23 UTC ( #726359=note: print w/ replies, xml ) Need Help??


in reply to To "use" expected version of .pm file

perl holds the paths to it's modules in the array @INC. A common way to manipulate that array is to add paths using use lib '/path/to/module'.
Also you might want to check the environment variable PERL5LIB.


Comment on Re: To "use" expected version of .pm file
Re^2: To "use" expected version of .pm file
by Rijwan (Novice) on Nov 27, 2008 at 10:36 UTC
    i have written following line - use lib "lib path"; but it gives error "unable to find lib.pm" There is no lib.pm file as such. few lines of code are - use strict; use Getopt::Std;
      try
      perldoc -q path
      Sounds like you have a broken install, as lib.pm is standard since version 5.001. What does perl -V report?

      lib is part of Perl, so that's very odd. But you don't have to use lib to modify @INC.

      BEGIN { unshift @INC, '/home/user/perllib'; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://726359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-09-01 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (15 votes), past polls