Branch Coverage

lib/Badger/Period.pm
Criterion Covered Total %
branch 23 48 47.9


line true false branch
58 28 0 unless ref $names eq "ARRAY"
62 28 0 wantarray ? :
77 0 5 if (@_ > 1) { }
3 2 elsif (@_ == 1 and defined $_[0]) { }
84 0 3 ref $_[0] eq 'HASH' ? :
91 5 0 if ($time = $config->{'time'})
92 2 3 if (&numlike($time)) { }
0 3 elsif (&is_object(scalar(ref $class || $class), $time)) { }
136 0 3 unless defined $target->{'uri'}
139 1 2 unless @$target{@fields} = map({0 + $_;} $target->{'uri'} =~ /$regex/o)
150 27 0 defined $_ ? :
169 3 1 unless $self->{$_}
201 0 0 if &numlike($duration)
213 0 0 if ($duration =~ /^ ( -? (?: \d+ | \d*\.\d+ ) ) \s* ([smhdMy]?) /x) { }
231 0 0 if $self->{'etime'} and @_ == 1 and &numlike($_[0])
236 10 0 @_ && &is_object(scalar(ref $self || $self), $_[0]) ? :
241 5 25 if ($self->{$item} < $comp->{$item}) { }
5 20 elsif ($self->{$item} > $comp->{$item}) { }
256 0 1 if ($month == 4 or $month == 6 or $month == 9 or $month == 11) { }
0 1 elsif ($month == 2) { }
260 0 0 $self->leap_year(@_) ? :
272 0 0 if ($year % 4) { }
0 0 elsif ($year % 400 == 0) { }
0 0 elsif ($year % 100 == 0) { }