Skip Menu | will be shut down on March 1st, 2021.

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

Owner: Nobody in particular
Requestors: EDAVIS [...]

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

Subject: ValuesAndExpressions::ProhibitMismatchedOperators: understand rand()
Download (untitled) / with headers
text/plain 301b
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.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to