When the value of the first argument to intersection() is zero, it's min/max value is being lost. e.g.
my $min = Number::Tolerant->new(0 => 'or_more');
my $max = Number::Tolerant->new(10 => 'or_less');
my $range = $min & $max;
say $range; # prints 'x <= 10' instead of '0 <= x <= 10'
This happens because the method is using a boolean OR (||) to find the min/max values instead of checking for definedness. If the first value is boolean false, the second (non-existent) value is taken.
When the value of the first argument to intersection() is zero, it's min/max value is being lost. e.g.
This happens because the method is using a boolean OR (||) to find the min/max values instead of checking for definedness. If the first value is boolean false, the second (non-existent) value is taken.