in reply to Re: disabling unnecessary perl modules
in thread disabling unnecessary perl modules
The reason why strace is more verbose than %INC is that Perl has to stat a file to see whether it exists. So say you've got:
BEGIN { @INC = qw( /tmp/lib1 /tmp/lib2/ /tmp/lib3 ); } use Foo::Bar;
And /tmp/lib3/Foo/Bar.pm is the only module that exists, Perl still has to stat /tmp/lib1/Foo/Bar.pm and /tmp/lib2/Foo/Bar.pm first. Only one actual module is loaded though.
(Actually Perl will also stat /tmp/lib1/Foo/Bar.pmc, /tmp/lib2/Foo/Bar.pmc, and /tmp/lib3/Foo/Bar.pmc too. This is due to a rarely used feature where Perl will try to load modules with .pmc extensions ahead of .pm. The intention is that you might write your code a Bar.pm and then "compile" it to Bar.pmc for deployment. I don't mean "compile" in the same sense that C is compiled; more like what Parse::RecDescent's Precompile method does.)
|
|---|