Branch Coverage

blib/lib/Physics/Unit/Scalar.pm
Criterion Covered Total %
branch 68 134 50.7


line true false branch
22 0 27 if $Physics::Unit::Scalar::debug
26 9 18 if (ref $proto) { }
35 0 18 if $Physics::Unit::Scalar::debug
36 17 1 if (defined $def)
43 3 15 if ($class eq 'Physics::Unit::Scalar') { }
61 1 14 if (not defined $def or $def eq '') { }
2 12 elsif ($def =~ /^$Physics::Unit::number_re$/io) { }
75 1 11 if 'Physics::Unit::' . $u->type ne $class
98 1 0 if (ref $proto) { }
108 10 1 unless @_
119 0 1 unless ref $self and ref $u
127 0 39 if @_
136 0 1 unless ref $self and ref $other
138 0 1 if ref $self ne ref $other
148 0 0 unless ref $self
159 0 0 unless ref $self and ref $other
161 0 0 if ref $self ne ref $other
173 0 8 unless ref $self and ref $other
192 0 5 unless ref $self
196 0 5 unless $self->{'value'}
213 0 2 unless ref $self and ref $other
223 24 30 if (ref $n) { }
233 0 60 if $Physics::Unit::Scalar::debug
250 32 0 if (ref $proto) { }
276 40 6 if ($type) { }
277 0 40 if $type eq "prefix"
309 0 20 if defined $format_string
328 0 9 unless ref $self and ref $other
338 0 1 unless ref $self and ref $other
361 0 0 if (scalar @type_context)
364 0 0 if ($type eq $preferred)
380 0 0 if ($type) { }
382 0 0 if ref $type eq "ARRAY"
383 0 0 if $type eq "prefix"
406 0 2 unless ref $self and ref $other
413 2 0 if (ref $self eq ref $other or ref $self eq 'Physics::Unit::Dimensionless' or ref $other eq 'Physics::Unit::Dimensionless') { }
431 0 2 unless ref $self and ref $other
436 2 0 if (ref $self eq ref $other or ref $self eq 'Physics::Unit::Dimensionless' or ref $other eq 'Physics::Unit::Dimensionless') { }
440 1 1 if (defined $swapped and $swapped == 1) { }
449 0 0 if (defined $swapped and $swapped == 1) { }
464 0 0 unless ref $self and ref $other
486 0 3 unless ref $self and ref $other
489 0 3 if (defined $swapped and $swapped == 1) { }
503 0 2 unless ref $self and ref $other
506 0 2 if ref $other ne "Physics::Unit::Dimensionless"
511 0 2 unless $p == int $p
517 0 2 if ($p < -1) { }
0 2 elsif ($p == -1) { }
0 2 elsif ($p == 0) { }
0 2 elsif ($p == 1) { }
542 0 1 unless ref $self
545 0 1 unless ref $self eq "Physics::Unit::Dimensionless"
554 0 1 unless ref $self
557 0 1 unless ref $self eq "Physics::Unit::Dimensionless"
568 0 3 unless ref $self and ref $other
573 3 0 if (ref $self eq ref $other or ref $self eq 'Physics::Unit::Dimensionless' or ref $other eq 'Physics::Unit::Dimensionless') { }
577 1 2 $swapped ? :
578 3 0 if defined $atan2v
590 0 1 unless ref $self
593 0 1 unless ref $self eq "Physics::Unit::Dimensionless"
602 0 1 unless ref $self
605 0 1 unless ref $self eq "Physics::Unit::Dimensionless"
614 0 1 unless ref $self
627 0 1 unless ref $self
643 0 12 unless ref $self and ref $other
646 12 0 if (ref $self eq ref $other or ref $self eq 'Physics::Unit::Dimensionless' or ref $other eq 'Physics::Unit::Dimensionless') { }
650 0 12 $swapped ? :