Change 11771 by sky@sky-lab on 2001/08/28 11:20:13

        Subject: [PATCH] put useful info in %INC for files loaded by a hook in @INC
        From: Rafael Garcia-Suarez <[EMAIL PROTECTED]>
        Date: Tue, 28 Aug 2001 14:23:43 +0200
        Message-ID: <20010828142343.A19299@rafael>

Affected files ...

... //depot/perl/pod/perlvar.pod#73 edit
... //depot/perl/pp_ctl.c#280 edit

Differences ...

==== //depot/perl/pod/perlvar.pod#73 (text) ====
Index: perl/pod/perlvar.pod
--- perl/pod/perlvar.pod.~1~    Tue Aug 28 05:30:05 2001
+++ perl/pod/perlvar.pod        Tue Aug 28 05:30:05 2001
@@ -1080,6 +1080,11 @@
 operator uses this hash to determine whether a particular file has
 already been included.
 
+If the file was loaded via a hook (see L<perlfunc/require> for a
+description of these hooks), a fake filename is inserted into %INC. It
+looks like F</loader/0x81095c8/Foo.pm>, where the hexadecimal number
+corresponds to the reference that was put in @INC.
+
 =item %ENV
 
 =item $ENV{expr}

==== //depot/perl/pp_ctl.c#280 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c.~1~   Tue Aug 28 05:30:05 2001
+++ perl/pp_ctl.c       Tue Aug 28 05:30:05 2001
@@ -3160,7 +3160,7 @@
                    }
 
                    Perl_sv_setpvf(aTHX_ namesv, "/loader/0x%"UVxf"/%s",
-                                  PTR2UV(SvANY(loader)), name);
+                                  PTR2UV(SvRV(dirsv)), name);
                    tryname = SvPVX(namesv);
                    tryrsfp = 0;
 
End of Patch.

Reply via email to