Skip Menu |
Report information
Id: 130507
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: perl6 [at] mscha.org
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



From: Michael Schaap <perl6 [...] mscha.org>
To: rakudobug [...] perl.org
Date: Thu, 5 Jan 2017 02:32:43 +0100
Subject: [BUG] "once" block doesn't run if it isn't reached the first time the parent block runs
Download (untitled) / with headers
text/plain 674b
for ^10 -> $i { once { say "This runs." } say $i; once { say "This runs as well." } next if $i < 5; once { say "This should run but doesn't." } } Actual output: This runs. 0 This runs as well. 1 2 3 4 5 6 7 8 9 Expected output: This runs. 0 This runs as well. 1 2 3 4 5 This should run but doesn't. 6 7 8 9 Possibly related bug: https://rt.perl.org/Ticket/Display.html?id=102994 Latest Rakudo Star: This is Rakudo version 2016.11 built on MoarVM version 2016.11 implementing Perl 6.c.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org