This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a49355
)
Clarify use of 'continue' keyword after 'given'.
author
James E Keenan
<jkeenan@cpan.org>
Tue, 20 Dec 2016 23:27:36 +0000
(18:27 -0500)
committer
James E Keenan
<jkeenan@cpan.org>
Fri, 23 Dec 2016 12:54:47 +0000
(07:54 -0500)
For: RT #130324
pod/perlsyn.pod
patch
|
blob
|
blame
|
history
diff --git
a/pod/perlsyn.pod
b/pod/perlsyn.pod
index
a5e075d
..
a78c095
100644
(file)
--- a/
pod/perlsyn.pod
+++ b/
pod/perlsyn.pod
@@
-638,8
+638,8
@@
Starting from Perl 5.16, one can prefix the switch
keywords with C<CORE::> to access the feature without a C<use feature>
statement. The keywords C<given> and
C<when> are analogous to C<switch> and
keywords with C<CORE::> to access the feature without a C<use feature>
statement. The keywords C<given> and
C<when> are analogous to C<switch> and
-C<case> in other languages
, so the code in the previous section could b
e
-rewritten as
+C<case> in other languages
-- though C<continue> is not -- so the cod
e
+
in the previous section could be
rewritten as
use v5.10.1;
for ($var) {
use v5.10.1;
for ($var) {
@@
-1118,7
+1118,7
@@
a C<break>.
=head3 Fall-through
You can use the C<continue> keyword to fall through from one
=head3 Fall-through
You can use the C<continue> keyword to fall through from one
-case to the next:
+case to the next
immediate C<when> or C<default>
:
given($foo) {
when (/x/) { say '$foo contains an x'; continue }
given($foo) {
when (/x/) { say '$foo contains an x'; continue }