summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-27 17:50:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-27 17:50:09 +0000
commitc99da3702f996b1fc1415a829383240bdf2f0fd2 (patch)
tree52f3b6e218561a59d3bcd9eb7fcc0bf35304582f /toke.c
parent732319c68d6251d786fd16eefa858e3d18632820 (diff)
downloadperl-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 94402604e9..6e457c299f 100644
--- a/toke.c
+++ b/toke.c
@@ -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,