Branch Coverage

blib/lib/DateTimeX/Moment/Duration.pm
Criterion Covered Total %
branch 43 50 86.0


line true false branch
22 55 7 if $a eq 'DateTime::Duration'
28 0 96 @_ == 1 && ref $_[0] eq 'HASH' ? :
32 316 452 exists $args{$key} ? :
34 0 96 if (%args)
53 83 31 unless $self->{'nanoseconds'}
58 6 25 if $seconds < 0
74 4 3 if $_[0]->_has_positive
75 7 2 if not $_[0]->_has_positive
76 6 10 &first(sub { $_ > 0; } , values %{$_[0];}) ? :
77 6 5 &first(sub { $_ < 0; } , values %{$_[0];}) ? :
81 53 3 if &first(sub { $_ != 0; } , values %$self)
102 12 52 if ($units{'years'})
107 8 56 if ($units{'months'})
111 11 53 if ($units{'weeks'})
116 8 56 if ($units{'days'})
120 21 43 if ($units{'hours'})
125 11 53 if ($units{'minutes'})
129 16 48 if ($units{'seconds'})
134 8 56 if ($units{'nanoseconds'})
138 2 62 wantarray ? :
209 7 0 if &blessed($_[0])
213 0 1 if $flip
215 0 1 if (_isa_datetime($rhs))
226 0 6 if $flip
228 0 6 if (_isa_datetime($rhs))