Branch Coverage

blib/lib/Number/Fraction.pm
Criterion Covered Total %
branch 63 104 60.5


line true false branch
229 10 5 if $args{':constants'}
461 2 208 if $self->{'den'} == 0
474 5 203 if ($self->{'den'} < 0)
491 23 97 if $self->{'den'} == 1
506 0 0 if $self->{'den'} == 1
508 0 0 $self->{'num'} * $self->{'den'} < 0 ? :
511 0 0 $int ? :
590 0 0 unless @denominators
594 0 0 if $near->{'den'} == 1
596 0 0 $near->{'num'} * $near->{'den'} < 0 ? :
600 0 0 unless ($frc)
636 10 2 if (ref $r) { }
637 9 1 if (UNIVERSAL::isa($r, ref $l)) { }
644 1 1 if ($r =~ /^[-+]?\d+$/) { }
665 10 2 if (ref $r) { }
666 9 1 if (UNIVERSAL::isa($r, ref $l)) { }
673 1 1 if ($r =~ /^[-+]?\d+$/) { }
694 11 4 if (ref $r) { }
695 10 1 if (UNIVERSAL::isa($r, ref $l)) { }
702 2 2 if ($r =~ /^[-+]?\d+$/) { }
704 1 1 $rev ? :
706 1 1 $rev ? :
724 12 4 if (ref $r) { }
725 11 1 if (UNIVERSAL::isa($r, ref $l)) { }
726 1 10 if $r->{'num'} == 0
733 2 2 if ($r =~ /^[-+]?\d+$/) { }
735 1 1 $rev ? :
737 1 1 $rev ? :
756 2 8 if ($rev)
760 2 0 unless $@
764 5 3 if (UNIVERSAL::isa($r, ref $l)) { }
3 0 elsif ($r =~ /^[-+]?\d+$/) { }
765 1 4 if ($r->{'den'} == 1) { }
776 0 0 UNIVERSAL::isa($r, ref $l) ? :
781 0 0 unless $@
783 0 0 if $@
785 0 0 unless $@
838 18 41 if (UNIVERSAL::isa($r, ref $l)) { }
845 59 0 unless $rev
852 20 41 if (UNIVERSAL::isa($r, ref $l)) { }
859 61 0 unless $rev
864 0 55 if _frac_lt(@_)
865 14 41 if _frac_gt(@_)
878 0 0 if $self->{'den'} == 1
880 0 0 unless @denominators
885 0 0 if (CORE::abs($self->{'num'} * $frc->{'den'} - $frc->{'num'} * $self->{'den'}) * $den - CORE::abs($self->{'num'} * $den - $num * $self->{'den'}) * $frc->{'den'} > 0)
900 168 40 if $y > $x
902 9 199 if $x == $y
939 0 0 if ($_[0] =~ m[^(?-?)(?\d+)/(?\d+)$])
942 0 0 $+{'sign'} ? :
944 0 0 if ($_[0] =~ m[^(?-?)(?\d+)$MIXED_SEP(?\d+)/(?\d+)$])
949 0 0 if ($_[0] =~ /^(?-?)(?\d+)$/)