M
Matthew Braid
Hi all,
I've recently upgraded to perl 5.8.7 and noticed something that is quite
annoying - File::Temp is fiddling with the order of the paths in @INC
(or at least some library it loads is - haven't quite found the
problematic code).
Example:
/usr/local/lib/perl5/site_perl/5.8.7 <<< Huh?!
/path/to/my/libs <<< Huh?!
/usr/local/lib/perl5/site_perl/5.8.7/mach
/usr/local/lib/perl5/site_perl/5.8.5
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.7/BSDPAN
/usr/local/lib/perl5/5.8.7/mach
/usr/local/lib/perl5/5.8.7
..
Normally this isn't a problem, but I use a custom version of Net::SMTP
that allows setting of the Original-Recipient header, and this no longer
works in some scripts since the 'real' Net::SMTP is loaded instead. I
can of course just go through and make sure File::Temp is loaded either
after Net::SMTP or before another call to 'use lib', but this looks like
very bad behaviour on the part of File::Temp to me.
It could of course be something that File::Temp use's or require's, but
so far I haven't found it by replacing 'use File::Temp' in my test line.
Any ideas? Is this new expected behaviour? A scan of the docs does not
mention @INC at all.
MB
I've recently upgraded to perl 5.8.7 and noticed something that is quite
annoying - File::Temp is fiddling with the order of the paths in @INC
(or at least some library it loads is - haven't quite found the
problematic code).
Example:
? print join("\n", @INC), "\n"'perl -e 'use lib "/path/to/my/libs"; print join("\n", @INC), "\n"' /path/to/my/libs
/usr/local/lib/perl5/site_perl/5.8.7/mach
/usr/local/lib/perl5/site_perl/5.8.7
/usr/local/lib/perl5/site_perl/5.8.5
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.7/BSDPAN
/usr/local/lib/perl5/5.8.7/mach
/usr/local/lib/perl5/5.8.7
..
perl -e 'use lib "/path/to/my/libs"; use File::Temp; \
/usr/local/lib/perl5/site_perl/5.8.7 <<< Huh?!
/path/to/my/libs <<< Huh?!
/usr/local/lib/perl5/site_perl/5.8.7/mach
/usr/local/lib/perl5/site_perl/5.8.5
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.7/BSDPAN
/usr/local/lib/perl5/5.8.7/mach
/usr/local/lib/perl5/5.8.7
..
Normally this isn't a problem, but I use a custom version of Net::SMTP
that allows setting of the Original-Recipient header, and this no longer
works in some scripts since the 'real' Net::SMTP is loaded instead. I
can of course just go through and make sure File::Temp is loaded either
after Net::SMTP or before another call to 'use lib', but this looks like
very bad behaviour on the part of File::Temp to me.
It could of course be something that File::Temp use's or require's, but
so far I haven't found it by replacing 'use File::Temp' in my test line.
Any ideas? Is this new expected behaviour? A scan of the docs does not
mention @INC at all.
MB