diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-12 15:12:29 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-12 15:12:29 +0000 |
commit | a91233bf4cf6a12df8935c3530a6ca900ca6ca2f (patch) | |
tree | e5f01c7cceef33abc4084882f26795e16f0e1696 /pod/perlfunc.pod | |
parent | 3984a8a147dd40f6d585876c73b55c08e683b0fb (diff) | |
download | perl-a91233bf4cf6a12df8935c3530a6ca900ca6ca2f.tar.gz |
Load .pmc always, even if they are older than a matching .pm file.
(This trick is going to be used by pugs.)
p4raw-id: //depot/perl@27483
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 4184c8ee55..8b12f989af 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4538,14 +4538,12 @@ will complain about not finding "F<Foo::Bar>" there. In this case you can do: eval "require $class"; -Now that you understand how C<require> looks for files in the case of -a bareword argument, there is a little extra functionality going on -behind the scenes. Before C<require> looks for a "F<.pm>" extension, -it will first look for a filename with a "F<.pmc>" extension. A file -with this extension is assumed to be Perl bytecode generated by -L<B::Bytecode|B::Bytecode>. If this file is found, and its modification -time is newer than a coinciding "F<.pm>" non-compiled file, it will be -loaded in place of that non-compiled file ending in a "F<.pm>" extension. +Now that you understand how C<require> looks for files in the case of a +bareword argument, there is a little extra functionality going on behind +the scenes. Before C<require> looks for a "F<.pm>" extension, it will +first look for a similar filename with a "F<.pmc>" extension. If this file +is found, it will be loaded in place of any file ending in a "F<.pm>" +extension. You can also insert hooks into the import facility, by putting directly Perl code into the @INC array. There are three forms of hooks: subroutine |