summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-12-04 11:04:24 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-12-04 14:33:30 -0800
commitf5eec17cdc8138641bd75afb9c79295f9bbecde3 (patch)
tree9564c22e8c6a5778fdc4f88894f962def489b8b8 /t
parentb15b9c2a4267eed1abe5a08e57b250f7fab2e9f9 (diff)
downloadperl-f5eec17cdc8138641bd75afb9c79295f9bbecde3.tar.gz
[perl #115818] Don’t croak for /[.zog.]/
/[.zog.]/ produces a warning, because the POSIX syntax is not used correctly. It must be /[[.zog.]]/. /[[.zog.]]/ croaks, because that POSIX syntax has not been imple- mented yet. There is currently a croak for the former, too, even though it is the latter syntax that is forbidden. There is no reason to forbid the former. The reason for warning is that /[.zog.]/ is a regular character class (equivalent to [.zog]), so it might not do what the programmer intended. If that is why we warn, it doesn’t make sense to croak. After all, perl is only guessing that the programmer *might* have made a mistake. This makes /[.foo.]/ similar to /[:foo:]/, which warns and then acts like /[:fo]/.
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/regcomp1
1 files changed, 0 insertions, 1 deletions
diff --git a/t/lib/warnings/regcomp b/t/lib/warnings/regcomp
index 84d46fc0e8..cb0c703add 100644
--- a/t/lib/warnings/regcomp
+++ b/t/lib/warnings/regcomp
@@ -98,7 +98,6 @@ no warnings 'regexp' ;
/[.zog.]/;
EXPECT
POSIX syntax [. .] belongs inside character classes in regex; marked by <-- HERE in m/[.zog.] <-- HERE / at - line 5.
-POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/[.zog.] <-- HERE / at - line 5.
########
# regcomp.c [S_regclass]
$_ = "";