diff options
author | Chip Salzenberg <chip@perl.com> | 1997-04-30 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-30 00:00:00 +1200 |
commit | 6da72b644b845971d5b417f3c6f5590e23084bcd (patch) | |
tree | 322d1e0b1a154d0b12f1fcc49838fe9a9aa4288c /perly.y | |
parent | 404b15a1d1b7c56f5774b99fd0d4b6854620182b (diff) | |
download | perl-6da72b644b845971d5b417f3c6f5590e23084bcd.tar.gz |
Support C< $coderef->($x,$y) >
Randal Schwartz said:
> Some time in October, 1994, Larry Wall said:
> > : All other references you can follow with ->, what about code refs?
> > Aw, look, I'd really like that feature in, but I think it's a bit
> > too close to the release for that.
> Hey Chip,
> Look, Larry said he'd really like that feature
Larry said that? That change is like two lines, it's in!
Tricked-into-doing-by: Randal Schwartz <merlyn@stonehenge.com>
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -529,6 +529,13 @@ term : term ASSIGNOP term prepend_elem(OP_LIST, $4, scalar(newCVREF(0,scalar($2))))); dep();} + | term ARROW '(' ')' %prec '(' + { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, + newCVREF(0, scalar($1))); } + | term ARROW '(' expr ')' %prec '(' + { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, $4, + newCVREF(0, scalar($1)))); } | LOOPEX { $$ = newOP($1, OPf_SPECIAL); hints |= HINT_BLOCK_SCOPE; } |