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()
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.