diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2013-06-27 16:48:36 +0100 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2013-12-22 13:28:20 -0500 |
commit | 8c74b41425572faeb638f1269025b59d0785794f (patch) | |
tree | 968acdd55f7bc4c12ad7784d21ba7a19389f9014 /perly.y | |
parent | 919ec23b10e41ed5c6aaf77a8ae3d2f7ef279f1b (diff) | |
download | perl-8c74b41425572faeb638f1269025b59d0785794f.tar.gz |
Remove support for "do SUBROUTINE(LIST)"
It's been deprecated (and emitting a warning) since Perl v5.0.0, and
support for it consitutes nearly 3% of the grammar.
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 43 |
1 files changed, 0 insertions, 43 deletions
@@ -1120,49 +1120,6 @@ termdo : DO term %prec UNIOP /* do $filename */ { $$ = newUNOP(OP_NULL, OPf_SPECIAL, op_scope($2)); TOKEN_GETMAD($1,$$,'D'); } - | DO subname '(' ')' /* do somesub() */ - { $$ = newUNOP(OP_ENTERSUB, - OPf_SPECIAL|OPf_STACKED, - op_prepend_elem(OP_LIST, - scalar(newCVREF( - (OPpENTERSUB_AMPER<<8), - scalar($2) - )),(OP*)NULL)); dep(); - TOKEN_GETMAD($1,$$,'o'); - TOKEN_GETMAD($3,$$,'('); - TOKEN_GETMAD($4,$$,')'); - } - | DO subname '(' expr ')' /* do somesub(@args) */ - { $$ = newUNOP(OP_ENTERSUB, - OPf_SPECIAL|OPf_STACKED, - op_append_elem(OP_LIST, - $4, - scalar(newCVREF( - (OPpENTERSUB_AMPER<<8), - scalar($2) - )))); dep(); - TOKEN_GETMAD($1,$$,'o'); - TOKEN_GETMAD($3,$$,'('); - TOKEN_GETMAD($5,$$,')'); - } - | DO scalar '(' ')' /* do $subref () */ - { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, - op_prepend_elem(OP_LIST, - scalar(newCVREF(0,scalar($2))), (OP*)NULL)); dep(); - TOKEN_GETMAD($1,$$,'o'); - TOKEN_GETMAD($3,$$,'('); - TOKEN_GETMAD($4,$$,')'); - } - | DO scalar '(' expr ')' /* do $subref (@args) */ - { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED, - op_prepend_elem(OP_LIST, - $4, - scalar(newCVREF(0,scalar($2))))); dep(); - TOKEN_GETMAD($1,$$,'o'); - TOKEN_GETMAD($3,$$,'('); - TOKEN_GETMAD($5,$$,')'); - } - ; term : termbinop |