Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
start blocks get their own $! and $/.
This avoids over-sharing of them, which can cause all sorts of pain.
  • Loading branch information
jnthn committed Aug 3, 2016
1 parent f32173b commit 08e39ee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Perl6/Actions.nqp
Expand Up @@ -2025,6 +2025,13 @@ class Perl6::Actions is HLL::Actions does STDActions {
}

method statement_prefix:sym<start>($/) {
my $block := $<blorst>.ast.ann('past_block');
unless $block.symbol('$/') {
$*W.install_lexical_magical($block, '$/');
}
unless $block.symbol('$!') {
$*W.install_lexical_magical($block, '$!');
}
make QAST::Op.new(
:op('callmethod'),
:name('start'),
Expand Down

0 comments on commit 08e39ee

Please sign in to comment.