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
|
---|
In Section
Seekers of Perl Wisdom