summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-25 16:32:48 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-25 16:32:48 +0000
commit4e4e412b11cee5b4d44ee0d29943215db93eb350 (patch)
tree8cc42fcbc78159e253ccb0e856af3ecc221f46c5 /toke.c
parent2135512ed9c202c6f2dec388d70c8833fa0bbfb1 (diff)
downloadperl-4e4e412b11cee5b4d44ee0d29943215db93eb350.tar.gz
make map behave like grep wrt indirect object slot when
there are parentheses; revert an experimental mod by Larry in change#2038 that failed to parse %{{qw(a b c)}} properly (this means C<map {use Foo; ...} ...> still needs a proper fix) p4raw-link: @2038 on //depot/perl: 834a4ddd8309fbf6aabbbc51bb6fcbe056e7963f p4raw-id: //depot/perl@3744
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 85b37a42ea..e5dcd330ba 100644
--- a/toke.c
+++ b/toke.c
@@ -2477,7 +2477,7 @@ Perl_yylex(pTHX)
|| (*t == '=' && t[1] == '>')))
OPERATOR(HASHBRACK);
if (PL_expect == XREF)
- PL_expect = XSTATE; /* was XTERM, trying XSTATE */
+ PL_expect = XTERM;
else {
PL_lex_brackstack[PL_lex_brackets-1] = XSTATE;
PL_expect = XSTATE;
@@ -3675,8 +3675,8 @@ Perl_yylex(pTHX)
TERM(sublex_start());
case KEY_map:
- LOP(OP_MAPSTART, XREF);
-
+ LOP(OP_MAPSTART, *s == '(' ? XTERM : XREF);
+
case KEY_mkdir:
LOP(OP_MKDIR,XTERM);