This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #121816] Add warning for repetition x < 0
authorKarl Williamson <khw@cpan.org>
Tue, 17 Jun 2014 15:39:51 +0000 (09:39 -0600)
committerKarl Williamson <khw@cpan.org>
Tue, 17 Jun 2014 15:54:50 +0000 (09:54 -0600)
commitb3211734a7d280a8b7c6acaaba333f8f6a314675
tree6757b4dd98bba1bb29c215588121d22914f175e3
parente21c1f156f378627d5dcc0a326f14b0a11d80fde
PATCH: [perl #121816] Add warning for repetition x < 0

I consider this experimental, so that if code breaks as a result, we
will remove it.

I chose the numeric warnings category.  But misc or a new subcategory of
numeric might be better choices.

There is also the issue if someone is calculating the repeat count in
floating point and gets something that would be 0 if there were infinite
precision, but ends up being a very small negative number.  The current
implementation will warn on that, but probably shouldn't.  I suspect that
this would be extremely rare in practice.
pod/perldelta.pod
pod/perldiag.pod
pp.c
t/lib/warnings/op