Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: use lib problem.

by Tomte (Priest)
on Jun 01, 2007 at 07:21 UTC ( #618658=note: print w/ replies, xml ) Need Help??


in reply to use lib problem.

This is because use lib $mod_path is evaluated during compile time (it's equivalent to BEGIN { require lib; lib->import($mod_path) ; } - but the assignement to $mod_path is done during runtime - in effect you are calling lib->import with an empty list as argument

I modified my lib.pm to produce a little message every time import is called:

my @mod_path = '/home/ripenapp/perl_mods'; use lib @mod_path; use Email::Valid; __END__ tomte@librics-tomte ~/scratch/test $ perl test.pl Importing:

Your first version:

use lib '/home/tanger/www/mods'; use Email::Valid; __END__ tomte@librics-tomte ~/scratch/test $ perl test.pl Importing: /home/tanger/www/mods

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus


Comment on Re: use lib problem.
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-07-28 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls