Change 27483 by [EMAIL PROTECTED] on 2006/03/12 15:12:29
Load .pmc always, even if they are older than a matching .pm file.
(This trick is going to be used by pugs.)
Affected files ...
... //depot/perl/pod/perlfunc.pod#515 edit
... //depot/perl/pp_ctl.c#531 edit
Differences ...
==== //depot/perl/pod/perlfunc.pod#515 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#514~27454~ 2006-03-09 14:07:01.000000000 -0800
+++ perl/pod/perlfunc.pod 2006-03-12 07:12:29.000000000 -0800
@@ -4538,14 +4538,12 @@
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
==== //depot/perl/pp_ctl.c#531 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#530~27428~ 2006-03-08 14:36:30.000000000 -0800
+++ perl/pp_ctl.c 2006-03-12 07:12:29.000000000 -0800
@@ -3037,15 +3037,7 @@
fp = check_type_and_open(name, mode);
}
else {
- Stat_t pmstat;
- if (PerlLIO_stat(name, &pmstat) < 0 ||
- pmstat.st_mtime < pmcstat.st_mtime)
- {
- fp = check_type_and_open(pmc, mode);
- }
- else {
- fp = check_type_and_open(name, mode);
- }
+ fp = check_type_and_open(pmc, mode);
}
SvREFCNT_dec(pmcsv);
}
End of Patch.