From: Dave Rolsky Date: Fri, 30 Oct 2009 16:09:08 +0000 (-0500) Subject: Clarify relationship of pattern modifiers and named subpatterns X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8eb5594e5b00118ae265dfff7fa7bd96290d4ed3;p=p5sagit%2Fp5-mst-13.2.git Clarify relationship of pattern modifiers and named subpatterns --- diff --git a/pod/perlre.pod b/pod/perlre.pod index 49d44c0..58c3dc7 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -703,6 +703,10 @@ will match C in any case, some spaces, and an exact (I repetition of the previous word, assuming the C modifier, and no C modifier outside this group. +These modifiers do not carry over into named subpatterns called in the +enclosing group. In other words, a pattern such as C<((?i)(&NAME))> does not +change the case-sensitivity of the "NAME" pattern. + Note that the C

modifier is special in that it can only be enabled, not disabled, and that its presence anywhere in a pattern has a global effect. Thus C<(?-p)> and C<(?-p:...)> are meaningless and will warn