New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't "continue" outside a when block -- make compile time #16796
Comments
From @epaCreated by @epaThe continue keyword in Perl can only be used inside a when-block. % perl -E 'continue' This is particularly useful for muddle-headed programmers who switch When parsing, Perl should check that continue statements are Perl Info
|
From @LeontOn Fri, Dec 28, 2018 at 10:45 AM Ed Avis (via RT)
Just like when, continue has dynamic scope, this would break in your suggestion: perl -Mexperimental=smartmatch -E 'given ("foo") { when (/f/) { say Leon |
The RT System itself - Status changed from 'new' to 'open' |
From @epaThanks for pointing that out. I would have expected a run-time warning Exiting subroutine via continue at -e line 1. We have such a warning for next, last, and redo; for consistency I'd expect it for continue. |
Migrated from rt.perl.org#133741 (status was 'open')
Searchable as RT133741$
The text was updated successfully, but these errors were encountered: