develooper Front page | perl.perl5.porters | Postings from May 2003

Re: [perl #8860] [not RESOLVED] .pmc extension not documented in require

Thread Previous | Thread Next
Casey West
May 9, 2003 13:59
Re: [perl #8860] [not RESOLVED] .pmc extension not documented in require
Message ID:
It was Friday, May 09, 2003 when Douglas Hunter took the soap box, saying:
: Casey West wrote:
: >Now it does, see patch below.
: >
: I believe L<B::ByteCode|B::ByteCode> should be 
: L<B::Bytecode|B::Bytecode>.  BTW, good work with these patches.

Excellent point (dang mac os), thank thanks.  :-)

  Casey West

Shooting yourself in the foot with MS-Windows
The gun blows up in your hand.

--- perl-current.orig/pod/perlfunc.pod  Fri May  9 00:58:19 2003
+++ perl-current/pod/perlfunc.pod       Fri May  9 16:58:23 2003
@@ -4056,6 +4056,15 @@
         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 it's 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.
 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
 references, array references and blessed objects.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About