tonkin has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w
use strict;
use FindBin;
use lib("$FindBin::Bin/../lib/perl");
use Template;
where I have a new File::Spec (v0.8) installed in the $FindBin::Bin/../lib/perl directory and the old one (v0.6) in the regular Perl5 lib directory.
Template.pm uses File::Temp which requires the new version of File::Spec.
I would expect the
use libstatement to force use of the newer version. It seems to Do The Right Thing to @INC, and the only Template.pm on the system is in the lnon-standard directory. But the program biffs because File::Temp (which is also in the non-standard dir!!) is loading.
Any clues?
Thanks,
Nick
Edited: ~Tue Jan 14 20:19:21 2003 (GMT) by footpad: Changed title, per Consideration; however, the title of the follow-up was used instead of the suggested retitle.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
FindBin breaks dependency on File::Spec if using non-standard lib dir (WAS: @INC madness %$#%$#$@!)
by tonkin (Initiate) on Jan 10, 2003 at 21:25 UTC |