Branch Coverage

blib/lib/DateTime/TimeZone.pm
Criterion Covered Total %
branch 46 130 35.3


line true false branch
57 0 1 if (exists $DateTime::TimeZone::Catalog::LINKS{$p{'name'}}) { }
0 1 elsif (exists $DateTime::TimeZone::Catalog::LINKS{uc $p{'name'}}) { }
64 1 0 unless ($p{'name'} =~ m[/] or $SpecialName{$p{'name'}})
66 0 1 if ($p{'name'} eq "floating")
70 1 0 if ($p{'name'} eq "local")
74 0 0 if ($p{'name'} eq "UTC" or $p{'name'} eq "Z")
81 0 0 if ($p{'name'} =~ m[Etc/(?:GMT|UTC)(\+|-)(\d{1,2})]i)
85 0 0 $1 eq '-' ? :
87 0 0 unless $hours <= 14
101 0 0 unless $real_class =~ /^\w+(::\w+)*$/
104 0 0 unless ($real_class->can("instance"))
118 0 0 if ($e)
122 0 0 if ($e =~ /^Can't locate $regex/i) { }
134 0 0 if ($zone->is_olson)
135 0 0 $zone->can('olson_version') ? :
141 0 0 if ($object_version ne $catalog_version)
182 0 0 if $self->can($m)
231 0 0 $type eq 'utc' ? :
235 0 0 if ($seconds < $self->max_span->[$end]) { }
248 0 0 unless (defined $span)
250 0 0 if $type eq "utc"
271 0 0 if $max % 2 and $max != 3
273 0 0 if @{$self->{'spans'};} == 1
278 0 0 if ($seconds < $current->[$start]) { }
0 0 elsif ($seconds >= $current->[$end]) { }
285 0 0 if $i < $min
294 0 0 if $i >= $max
301 0 0 if ($current->[5] and $type eq "local")
305 0 0 if $current->[1] == "Inf"
315 0 0 unless defined $next
317 0 0 if (not $next->[5] and $next->[$start] <= $seconds and $seconds <= $next->[$end])
362 0 0 if (@rules == 2) { }
0 0 elsif (@rules == 1) { }
363 0 0 $x ? :
385 0 0 if $next->utc_rd_as_seconds < $self->max_span->[1]
420 0 0 if $seconds >= $span->[$start] and $seconds < $span->[$end]
430 0 0 $_[0] eq 'utc' ? :
460 0 0 $tz && $tz->isa('DateTime::TimeZone') ? :
477 0 0 if ($class->isa('DateTime::TimeZone')) { }
498 1 19 if &try(sub {
500 0 20 unless defined $offset
502 0 20 if $offset eq 0
505 0 20 if ($offset =~ /^([\+\-])?(\d\d?):(\d\d)(?::(\d\d))?$/) { }
20 0 elsif ($offset =~ /^([\+\-])?(\d\d)(\d\d)(\d\d)?$/) { }
515 1 19 unless defined $sign
516 0 20 unless $hours >= 0 and $hours <= 99
517 0 20 unless $minutes >= 0 and $minutes <= 59
519 0 4 unless not defined $seconds or $seconds >= 0 and $seconds <= 59
522 4 16 if $seconds
523 8 12 if $sign eq "-"
534 1 39 if &try(sub {
537 0 40 unless defined $offset
538 2 38 unless $offset >= -359999 and $offset <= 359999
540 16 22 $offset < 0 ? :
551 8 30 $secs ? :
564 1 1 wantarray ? :
570 1 1 wantarray ? :
575 1 1 wantarray ? :
580 1 2 if $_[0]->isa("DateTime::TimeZone")
581 0 3 unless exists $DateTime::TimeZone::Catalog::CATEGORIES{$_[0]}
585 2 1 wantarray ? :
590 1 0 wantarray ? :
595 1 4 if $_[0]->isa("DateTime::TimeZone")
599 0 5 unless exists $DateTime::TimeZone::Catalog::ZONES_BY_COUNTRY{lc $_[0]}
604 4 1 wantarray ? :