diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-27 17:50:09 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-27 17:50:09 +0000 |
commit | c99da3702f996b1fc1415a829383240bdf2f0fd2 (patch) | |
tree | 52f3b6e218561a59d3bcd9eb7fcc0bf35304582f /toke.c | |
parent | 732319c68d6251d786fd16eefa858e3d18632820 (diff) | |
download | perl-c99da3702f996b1fc1415a829383240bdf2f0fd2.tar.gz |
Repatch from Robin Barker: anon subs in C<package;> are
now __ANON__::__ANON__ (should help for mod_perl breakage
since #12251)
p4raw-id: //depot/perl@14899
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4027,7 +4027,8 @@ Perl_yylex(pTHX) if (strEQ(proto, "$")) OPERATOR(UNIOPSUB); if (*proto == '&' && *s == '{') { - sv_setpv(PL_subname,"__ANON__"); + sv_setpv(PL_subname, PL_curstash ? + "__ANON__" : "__ANON__::__ANON__"); PREBLOCK(LSTOPSUB); } } @@ -5008,7 +5009,8 @@ Perl_yylex(pTHX) force_next(THING); } if (!have_name) { - sv_setpv(PL_subname,"__ANON__"); + sv_setpv(PL_subname, + PL_curstash ? "__ANON__" : "__ANON__::__ANON__"); TOKEN(ANONSUB); } (void) force_word(PL_oldbufptr + tboffset, WORD, |