diff options
author | Karl Williamson <khw@cpan.org> | 2019-03-23 10:16:16 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-03-23 10:24:26 -0600 |
commit | d9a91485293e1414746fd028b3782f699519105e (patch) | |
tree | c0d66956e1e009f7c4286f913df74cb11deea632 /pod/perlre.pod | |
parent | 39ce401c1db32fe69d69d11cfd7b62071e52f43a (diff) | |
download | perl-d9a91485293e1414746fd028b3782f699519105e.tar.gz |
PATCH: [perl #132851] Empty /(?)/
This changes perlre to note that zero modifiers are allowed in the
(?...) construct, but changes the code to warn about this no-op, but
only under "use re 'strict'".
Diffstat (limited to 'pod/perlre.pod')
-rw-r--r-- | pod/perlre.pod | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod index f9ea161700..cc717075ac 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -1376,7 +1376,7 @@ an escape sequence. Examples: =item C<(?^alupimnsx)> X<(?)> X<(?^)> -One or more embedded pattern-match modifiers, to be turned on (or +Zero or more embedded pattern-match modifiers, to be turned on (or turned off if preceded by C<"-">) for the remainder of the pattern or the remainder of the enclosing pattern group (if any). @@ -1450,6 +1450,10 @@ C<(?-d:...)> and C<(?dl:...)> are fatal errors. Note also that the C<"p"> modifier is special in that its presence anywhere in a pattern has a global effect. +Having zero modifiers makes this a no-op (so why did you specify it, +unless it's generated code), and starting in v5.30, warns under L<C<use +re 'strict'>|re/'strict' mode>. + =item C<(?:I<pattern>)> X<(?:)> |