summaryrefslogtreecommitdiff
path: root/ext/re
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-03-07 10:30:18 -0700
committerKarl Williamson <khw@cpan.org>2015-03-07 11:28:28 -0700
commit1eac213ad23c12a812d4794440e893443bbb12d2 (patch)
tree2d9ec8d12926748cc83150d75b8180d6f45a7940 /ext/re
parent61b46553d484b1bc3ca8c690f66aedebffd73e9f (diff)
downloadperl-1eac213ad23c12a812d4794440e893443bbb12d2.tar.gz
use re 'strict' doc changes
Add to perlexperiment; note that an alternative syntax has been proposed; nits.
Diffstat (limited to 'ext/re')
-rw-r--r--ext/re/re.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 92ddaf541b..058b8aa961 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -4,7 +4,7 @@ package re;
use strict;
use warnings;
-our $VERSION = "0.31";
+our $VERSION = "0.32";
our @ISA = qw(Exporter);
our @EXPORT_OK = ('regmust',
qw(is_regexp regexp_pattern
@@ -372,6 +372,9 @@ if $pat contains C<(?{ ... })> assertions or C<(??{ ... })> subexpressions.
=head2 'strict' mode
+Note that this is an experimental feature which may be changed or removed in a
+future Perl release.
+
When C<use re 'strict'> is in effect, stricter checks are applied than
otherwise when compiling regular expressions patterns. These may cause more
warnings to be raised than otherwise, and more things to be fatal instead of
@@ -380,8 +383,8 @@ things, which may be legal, but have a reasonable possibility of not being the
programmer's actual intent. This automatically turns on the C<"regexp">
warnings category (if not already on) within its scope.
-As an example of something that is caught under C<"strict'> but not otherwise
-is the pattern
+As an example of something that is caught under C<"strict'>, but not
+otherwise, is the pattern
qr/\xABC/
@@ -405,8 +408,9 @@ if there are more than two.
It is expected that what exactly C<'strict'> does will evolve over time as we
gain experience with it. This means that programs that compile under it in
today's Perl may not compile, or may have more or fewer warnings, in future
-Perls. There is no backwards compatibility promises with regards to it. For
-this reason, using it will raise a C<experimental::re_strict> class warning,
+Perls. There is no backwards compatibility promises with regards to it. Also
+there are already proposals for an alternate syntax for enabling it. For
+these reasons, using it will raise a C<experimental::re_strict> class warning,
unless that category is turned off.
Note that if a pattern compiled within C<'strict'> is recompiled, say by