X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=toke.c;h=83e43bfd11565752070d112fe447847f36c4cbe0;hb=7c4baf47da;hp=b1a9ff6a0324f4fe2a912b243079c4f2114f3d52;hpb=5486870fe7f0fd0e99bf9619d5fd857a5b972014;p=p5sagit%2Fp5-mst-13.2.git diff --git a/toke.c b/toke.c index b1a9ff6..83e43bf 100644 --- a/toke.c +++ b/toke.c @@ -671,11 +671,10 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) /* on scope exit, free this parser and restore any outer one */ SAVEPARSER(parser); + parser->saved_curcop = PL_curcop; /* initialise lexer state */ - SAVECOPLINE(PL_curcop); - #ifdef PERL_MAD parser->curforce = -1; #else @@ -723,6 +722,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) void Perl_parser_free(pTHX_ const yy_parser *parser) { + PL_curcop = parser->saved_curcop; SvREFCNT_dec(parser->linestr); if (parser->rsfp == PerlIO_stdin())