From: Rafael Garcia-Suarez Date: Tue, 28 Aug 2001 14:23:43 +0000 (+0200) Subject: put useful info in %INC for files loaded by a hook in @INC X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=44f0be639a72c23a82ef49a1790b9b38a494dd31;p=p5sagit%2Fp5-mst-13.2.git put useful info in %INC for files loaded by a hook in @INC Message-ID: <20010828142343.A19299@rafael> p4raw-id: //depot/perl@11771 --- diff --git a/pod/perlvar.pod b/pod/perlvar.pod index cdbd53f..d723271 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -1080,6 +1080,11 @@ value is the location of the file found. The C operator uses this hash to determine whether a particular file has already been included. +If the file was loaded via a hook (see L for a +description of these hooks), a fake filename is inserted into %INC. It +looks like F, where the hexadecimal number +corresponds to the reference that was put in @INC. + =item %ENV =item $ENV{expr} diff --git a/pp_ctl.c b/pp_ctl.c index f64b18d..6a23961 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3160,7 +3160,7 @@ trylocal: { } Perl_sv_setpvf(aTHX_ namesv, "/loader/0x%"UVxf"/%s", - PTR2UV(SvANY(loader)), name); + PTR2UV(SvRV(dirsv)), name); tryname = SvPVX(namesv); tryrsfp = 0;