summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-02 17:19:22 +0100
committerDavid Mitchell <davem@iabyn.com>2015-10-02 17:23:23 +0100
commit5d051ee03641d21c898bf366fb1caee7baf7e646 (patch)
tree26fb55d97521454facd4b45552201c65c052d091 /perly.y
parent9ff1a054e52a031d80d4625192ca222e15bb9c69 (diff)
downloadperl-5d051ee03641d21c898bf366fb1caee7baf7e646.tar.gz
given(): remove support for lexical $_
There is dead code that used to allow my $_; ... given ($foo) { # lexical $_ aliased to $foo here } Now that lexical $_ has been removed, remove the code. I've left the signatures of the newFOO() functions unchanged; they just expect a target of 0 to always be passed now.
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y8
1 files changed, 1 insertions, 7 deletions
diff --git a/perly.y b/perly.y
index 4b73977d9f..b3be67dda1 100644
--- a/perly.y
+++ b/perly.y
@@ -366,13 +366,7 @@ barestmt: PLUGSTMT
}
| GIVEN '(' remember mexpr ')' mblock
{
- const PADOFFSET offset = pad_findmy_pvs("$_", 0);
- $$ = block_end($3,
- newGIVENOP($4, op_scope($6),
- offset == NOT_IN_PAD
- || PAD_COMPNAME_FLAGS_isOUR(offset)
- ? 0
- : offset));
+ $$ = block_end($3, newGIVENOP($4, op_scope($6), 0));
parser->copline = (line_t)$1;
}
| WHEN '(' remember mexpr ')' mblock