Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 56788
Status: new
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.105
Fixed in: (no value)



Subject: ValuesAndExpressions::ProhibitMismatchedOperators: understand rand()
I expected the following code to give a 'mismatched operator' message: my $x = 0.1; if (rand() lt $x) { print "yes\n"; } The ValuesAndExpressions::ProhibitMismatchedOperators policy should understand that rand() returns a numeric value and so it is not correct to use it with lt, gt, and so on.