X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp_ctl.c;h=5cbf0a87ab0b715463ec44d20b7f9780d13f9be7;hb=7d4724f95a69a8d5a7cd565f21487912e6d331c0;hp=708f2fa07a38f852c04254c0dd746884921274bd;hpb=664e119dc7d588fadda4e2290471766a53190667;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp_ctl.c b/pp_ctl.c index 708f2fa..5cbf0a8 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -295,7 +295,7 @@ PP(pp_substcont) SvUPGRADE(sv, SVt_PVMG); if (!(mg = mg_find(sv, PERL_MAGIC_regex_global))) { #ifdef PERL_OLD_COPY_ON_WRITE - if (SvIsCOW(lsv)) + if (SvIsCOW(sv)) sv_force_normal_flags(sv, 0); #endif mg = sv_magicext(sv, NULL, PERL_MAGIC_regex_global, &PL_vtbl_mglob, @@ -2450,13 +2450,13 @@ PP(pp_goto) SV **ary = AvALLOC(av); if (AvARRAY(av) != ary) { AvMAX(av) += AvARRAY(av) - AvALLOC(av); - SvPV_set(av, (char*)ary); + AvARRAY(av) = ary; } if (items >= AvMAX(av) + 1) { AvMAX(av) = items - 1; Renew(ary,items+1,SV*); AvALLOC(av) = ary; - SvPV_set(av, (char*)ary); + AvARRAY(av) = ary; } } ++mark; @@ -3166,6 +3166,7 @@ PP(pp_require) if (SvROK(dirsv)) { int count; + SV **svp; SV *loader = dirsv; if (SvTYPE(SvRV(loader)) == SVt_PVAV @@ -3193,6 +3194,11 @@ PP(pp_require) count = call_sv(loader, G_ARRAY); SPAGAIN; + /* Adjust file name if the hook has set an %INC entry */ + svp = hv_fetch(GvHVn(PL_incgv), name, len, 0); + if (svp) + tryname = SvPVX_const(*svp); + if (count > 0) { int i = 0; SV *arg; @@ -3455,8 +3461,6 @@ PP(pp_entereval) } sv = POPs; - if (!SvPV_nolen_const(sv)) - RETPUSHUNDEF; TAINT_PROPER("eval"); ENTER;