This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #92898] Clarify (*THEN)’s scope
authorFather Chrysostomos <sprout@cpan.org>
Sat, 24 Sep 2011 04:33:58 +0000 (21:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Sep 2011 04:36:00 +0000 (21:36 -0700)
pod/perlre.pod

index ad2dbf1..dafe4cf 100644 (file)
@@ -1830,10 +1830,12 @@ As a shortcut C<(*MARK:NAME)> can be written C<(*:NAME)>.
 
 =item C<(*THEN)> C<(*THEN:NAME)>
 
-This is similar to the "cut group" operator C<::> from Perl 6. Like
+This is similar to the "cut group" operator C<::> from Perl 6.  Like
 C<(*PRUNE)>, this verb always matches, and when backtracked into on
 failure, it causes the regex engine to try the next alternation in the
-innermost enclosing group (capturing or otherwise).
+innermost enclosing group (capturing or otherwise) that has alternations.
+The two branches of a C<(?(condition)yes-pattern|no-pattern)> do not
+count as an alternation, as far as C<(*THEN)> is concerned.
 
 Its name comes from the observation that this operation combined with the
 alternation operator (C<|>) can be used to create what is essentially a