The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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:
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.)
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
In reply to Re^2: disabling unnecessary perl modules
by tobyink
|
|