Branch Coverage

blib/lib/DateTimeX/Lite/OlsonDB.pm
Criterion Covered Total %
branch 21 182 11.5


line true false branch
36 0 0 unless open my $fh, "<$file"
49 0 0 if $line =~ /^\s+$/
50 0 0 if $line =~ /^#/
55 0 0 if ($$self{'in_zone'} and $line =~ /^\t/)
63 0 0 if (substr($line, 0, 4) eq $_)
83 0 0 if $rule{'letter'} eq '-'
86 0 0 if $rule{'type'} eq '-'
100 0 0 $name ? :
101 0 0 if defined $_
104 0 0 unless ($name)
112 0 0 if ($obs{'rules'} =~ /\d\d?:\d\d/) { }
118 0 0 if $obs{'rules'} eq '-'
121 0 0 unless defined $obs{'until'}
149 0 0 unless exists $$self{'zones'}{$name}
178 0 0 unless defined $name
180 0 0 unless exists $$self{'rules'}{$name}
190 0 1118 if $day =~ /^\d+$/
192 46 1072 if ($day =~ /^last(\w\w\w)$/) { }
1072 0 elsif ($day =~ /^(\w\w\w)([><])=(\d\d?)$/) { }
225 0 1072 $2 eq '<' ? :
253 0 1118 unless defined $minute
254 1118 0 unless defined $second
257 0 1118 if ($hour == 24)
264 46 1072 if ($is_utc) { }
286 46 1026 if $is_std
295 0 1118 if $add_day
334 0 0 $self->last_change ? :
336 0 0 $self->last_change ? :
349 0 0 $rule ? :
351 0 0 $rule ? :
370 0 0 if ($obs->rules)
376 0 0 $self->last_change ? :
379 0 0 if ($x == $#{$$self{'observances'};})
383 0 0 if ($rule->is_infinite)
397 0 0 if (defined $change->utc_start_datetime) { }
399 0 0 if (@{$$self{'changes'};} and $$self{'changes'}[-1]->utc_start_datetime and $$self{'changes'}[-1]->utc_start_datetime == $change->utc_start_datetime)
404 0 0 if ($$self{'changes'}[-1]->rule and $change->observance)
419 0 0 if ($last_change->short_name eq $change->short_name and $last_change->total_offset == $change->total_offset and $last_change->is_dst == $change->is_dst and $last_change->observance eq $change->observance)
428 0 0 if ($last_rule eq $new_rule)
440 0 0 if ($$self{'earliest'}) { }
456 0 0 unless @{$_[0]{'changes'};} or $_[0]{'earliest'}
457 0 0 @{$_[0]{'changes'};} ? :
463 0 0 defined $_[0]{'earliest'} ? :
496 0 0 if ($p{'utc_start_datetime'})
501 0 0 if $$self{'first_rule'}
535 0 0 if ($self->utc_start_datetime) { }
551 0 0 if ($until) { }
562 0 0 if $rule->max_year and $rule->max_year > $max_rule_year
566 0 0 if $max_rule_year > $max_year
579 0 0 if $self->utc_start_datetime and $dt <= $self->utc_start_datetime
583 0 0 if $until and $dt >= $until
618 0 0 if $_->min_year <= $year
630 0 0 unless defined $self->until_year
649 0 0 defined $_[0]{'until'}[1] ? :
657 0 0 defined $_[0]{'until'}[2] ? :
666 0 0 defined $_[0]{'until'}[3] ? :
675 0 0 unless $self->utc_start_datetime
676 0 0 unless $self->rules
696 0 0 if $temp_year > $year
698 0 0 if $rule->min_year > $temp_year
703 0 0 unless keys %possible_rules
708 0 0 if $rule->min_year < $earliest_year
727 0 0 if ($rule->min_year > $y)
735 0 0 if ($rule->max_year and $rule->max_year < $y)
751 0 0 unless @rule_dates
765 0 0 $x < @rule_dates - 1 ? :
767 0 0 if $next_dt and $next_dt < $date
772 0 0 if $next_dt and 0
775 0 0 if not $next_dt and 0
778 0 0 if ($dt <= $date)
780 0 0 if ($next_dt) { }
782 0 0 if $date < $next_dt
783 0 0 if $date == $next_dt
811 0 0 if ($save) { }
828 0 0 $_[0]{'to'} eq 'max' ? :
0 0 $_[0]{'to'} eq 'only' ? :
831 0 0 $_[0]{'to'} eq 'max' ? :
870 0 1081 unless ($p{'type'} =~ /^(?:observance|rule)$/)
879 0 1081 if ($p{'type'} eq 'observance') { }
881 0 0 if defined $p{'rule'}
882 0 0 if $p{'observance'}->offset_from_std
889 1081 0 if defined $p{'rule'}
895 534 547 if $p{'rule'} and $p{'rule'}->offset_from_std
896 0 1081 if $p{'observance'}->offset_from_std
898 0 1081 if ($p{'short_name'} =~ m[(\w+)/(\w+)])
900 0 0 $p{'is_dst'} ? :
922 1065 0 if (defined $c1->utc_start_datetime) { }
951 0 0 if ($self->utc_start_datetime) { }
964 0 0 if ($obs->offset_from_std or $self->rule) { }
966 0 0 if ($obs->offset_from_std)
971 0 0 if ($self->rule)