I was unaware of this construct when I wrote the commit that broke it,
and there were no tests for it. Now there are.
C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
[perl #125805]
C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
[perl #125805]
+=item *
+
+Regular expression possesive quantifier v5.20 regression now fixed.
+C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically
+to C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>. Since v5.20, this didn't
+work if I<min> and I<max> were equal. [perl #125825]
+
=back
=head1 Known Problems
=back
=head1 Known Problems
ret = reg_node(pRExC_state, OPFAIL);
return ret;
}
ret = reg_node(pRExC_state, OPFAIL);
return ret;
}
- else if (min == max
- && RExC_parse < RExC_end
- && (*RExC_parse == '?' || *RExC_parse == '+'))
+ else if (min == max && RExC_parse < RExC_end && *RExC_parse == '?')
{
if (PASS2) {
ckWARN2reg(RExC_parse + 1,
{
if (PASS2) {
ckWARN2reg(RExC_parse + 1,
/w\zxy?\z/i \x{100}a\x{80}a n - -
/w\z\R\z/i \x{100}a\x{80}a n - -
/w\zxy?\z/i \x{100}a\x{80}a n - -
/w\z\R\z/i \x{100}a\x{80}a n - -
+/(a+){1}+a/ aaa n - - # [perl #125825]
+
# Keep these lines at the end of the file
# vim: softtabstop=0 noexpandtab
# Keep these lines at the end of the file
# vim: softtabstop=0 noexpandtab
'Useless (?c) - use /gc modifier {#} m/(?ogc{#})\x{100}/',
],
'/a{1,1}?\x{100}/' => 'Useless use of greediness modifier \'?\' {#} m/a{1,1}?{#}\x{100}/',
'Useless (?c) - use /gc modifier {#} m/(?ogc{#})\x{100}/',
],
'/a{1,1}?\x{100}/' => 'Useless use of greediness modifier \'?\' {#} m/a{1,1}?{#}\x{100}/',
- '/b{3} +\x{100}/x' => 'Useless use of greediness modifier \'+\' {#} m/b{3} +{#}\x{100}/',
"/(?[ [ % - % ] ])/" => "",
"/(?[ [ : - \\x$colon_hex ] ])\\x{100}/" => "\": - \\x$colon_hex \" is more clearly written simply as \":\" {#} m/(?[ [ : - \\x$colon_hex {#}] ])\\x{100}/",
"/(?[ [ \\x$colon_hex - : ] ])\\x{100}/" => "\"\\x$colon_hex\ - : \" is more clearly written simply as \":\" {#} m/(?[ [ \\x$colon_hex - : {#}] ])\\x{100}/",
"/(?[ [ % - % ] ])/" => "",
"/(?[ [ : - \\x$colon_hex ] ])\\x{100}/" => "\": - \\x$colon_hex \" is more clearly written simply as \":\" {#} m/(?[ [ : - \\x$colon_hex {#}] ])\\x{100}/",
"/(?[ [ \\x$colon_hex - : ] ])\\x{100}/" => "\"\\x$colon_hex\ - : \" is more clearly written simply as \":\" {#} m/(?[ [ \\x$colon_hex - : {#}] ])\\x{100}/",