Subject: | Math::BigInt ':constant' confuses branch coverage |
The following code should give 50% branch coverage:
use Math::BigInt ':constant';
my $x = 1;
print $x if 1 >= $x;
Instead, we get 0%. This appears to be due to the fact that the "1" in
the branch condition is automatically turned into a Math::BigInt.
Commenting out the "Math::BigInt" line and redoing the coverage report
gives the expected result.
In the false report, the branch condition appears as follows:
if {sign => '+', value => [1]} >= $x
Cheers.