This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clarify use of 'continue' keyword after 'given'.
authorJames E Keenan <jkeenan@cpan.org>
Tue, 20 Dec 2016 23:27:36 +0000 (18:27 -0500)
committerJames E Keenan <jkeenan@cpan.org>
Fri, 23 Dec 2016 12:54:47 +0000 (07:54 -0500)
For: RT #130324

pod/perlsyn.pod

index a5e075d..a78c095 100644 (file)
@@ -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 be
-rewritten as
+C<case> in other languages -- though C<continue> is not -- so the code
+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 }