X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_ctl.c;h=8b320bf92a6de0f1ef1a469808db70b86994cc1e;hb=bb407f0b8769c638c05e60ebfd157a1e676a6c22;hp=2c7bde33c769d98a424e3a67aee6c80f3d55a50d;hpb=e3407aba2c52ce8e302b2dc706d0837bc82c537f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_ctl.c b/pp_ctl.c index 2c7bde3..8b320bf 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1493,7 +1493,7 @@ Perl_die_where(pTHX_ char *message, STRLEN msglen) #endif PerlIO *serr = Perl_error_log; - PerlIO_write(serr, message, msglen); + PERL_WRITE_MSG_TO_CONSOLE(serr, message, msglen); (void)PerlIO_flush(serr); #ifdef USE_SFIO errno = e; @@ -3323,10 +3323,14 @@ trylocal: { SETERRNO(0, SS$_NORMAL); /* Assume success here to prevent recursive requirement. */ - (void)hv_store(GvHVn(PL_incgv), name, strlen(name), - (hook_sv ? SvREFCNT_inc(hook_sv) - : newSVpv(CopFILE(&PL_compiling), 0)), - 0 ); + len = strlen(name); + /* Check whether a hook in @INC has already filled %INC */ + if (!hook_sv || !(svp = hv_fetch(GvHVn(PL_incgv), name, len, 0))) { + (void)hv_store(GvHVn(PL_incgv), name, len, + (hook_sv ? SvREFCNT_inc(hook_sv) + : newSVpv(CopFILE(&PL_compiling), 0)), + 0 ); + } ENTER; SAVETMPS;