X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pad.c;h=07f994ae492cb8157f8d8a1ef24f8e2af2bf2224;hb=a662d730755bd4763502de042ac949ef3a7a71ae;hp=8560d9aa471636227bdc6b9f1f2cb191ad7b12e2;hpb=fda9478484acad719a798cc07d7a2ec14093628d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pad.c b/pad.c index 8560d9a..07f994a 100644 --- a/pad.c +++ b/pad.c @@ -168,7 +168,7 @@ Perl_pad_new(pTHX_ int flags) SAVEI32(PL_comppad_name_fill); SAVEI32(PL_min_intro_pending); SAVEI32(PL_max_intro_pending); - SAVEI32(PL_cv_has_eval); + SAVEBOOL(PL_cv_has_eval); if (flags & padnew_SAVESUB) { SAVEI32(PL_pad_reset_pending); } @@ -550,7 +550,7 @@ Perl_pad_check_dup(pTHX_ const char *name, bool is_our, const HV *ourstash) break; /* "our" masking "our" */ Perl_warner(aTHX_ packWARN(WARN_MISC), "\"%s\" variable %s masks earlier declaration in same %s", - (is_our ? "our" : PL_in_my == KEY_my ? "my" : "state"), + (is_our ? "our" : PL_parser->in_my == KEY_my ? "my" : "state"), name, (COP_SEQ_RANGE_HIGH(sv) == PAD_MAX ? "scope" : "statement")); --off; @@ -1501,8 +1501,8 @@ Perl_cv_clone(pTHX_ CV *proto) "Variable \"%s\" is not available", SvPVX_const(namesv)); sv = NULL; } - else { - assert(!SvPADSTALE(sv)); + /* 'my $x if $y' can leave $x stale even in an active sub */ + else if (!SvPADSTALE(sv)) { SvREFCNT_inc_simple_void_NN(sv); } }