summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2001-09-20 00:47:14 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2001-09-23 21:11:22 +0000
commit89ccab8c20e3e6e4f26601a6cd281f4a12410607 (patch)
treeffd6d14936c2a95c5efc9518d102047f35b3b9a4 /pp_ctl.c
parent033093593b6c100ab1090ed4361e4f7a7ac01f7a (diff)
downloadperl-89ccab8c20e3e6e4f26601a6cd281f4a12410607.tar.gz
proposal : put the @INC-hooks directly in %INC
Message-ID: <20010919224714.A6382@rafael> p4raw-id: //depot/perl@12162
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 5d2d10f94c..d488b7ce37 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3032,6 +3032,7 @@ PP(pp_require)
GV *filter_child_proc = 0;
SV *filter_state = 0;
SV *filter_sub = 0;
+ SV *hook_sv = 0;
sv = POPs;
if (SvNIOKp(sv)) {
@@ -3230,6 +3231,7 @@ trylocal: {
LEAVE;
if (tryrsfp) {
+ hook_sv = dirsv;
break;
}
@@ -3319,7 +3321,9 @@ trylocal: {
/* Assume success here to prevent recursive requirement. */
(void)hv_store(GvHVn(PL_incgv), name, strlen(name),
- newSVpv(CopFILE(&PL_compiling), 0), 0 );
+ (hook_sv ? SvREFCNT_inc(hook_sv)
+ : newSVpv(CopFILE(&PL_compiling), 0)),
+ 0 );
ENTER;
SAVETMPS;