Branch Coverage

lib/DateTimeX/Web.pm
Criterion Covered Total %
branch 52 72 72.2


line true false branch
22 7 76 if (@_ == 1)
23 3 4 if ref $_[0] eq 'HASH'
24 2 2 if ref $_[0] eq 'ARRAY'
26 2 76 if @_ % 2
57 5 38 if ($package)
58 1 4 if (ref $package) { }
62 3 1 unless ($package =~ s/^\+//)
67 0 4 if $@
68 3 1 $package->can('new') ? :
78 37 12 if ($zone)
80 2 35 &blessed($zone) && $zone->isa('DateTime::TimeZone') ? :
90 36 6 if ($locale)
92 2 34 &blessed($locale) && ($locale->isa('DateTime::Locale::root') || $locale->isa('DateTime::Locale::FromData')) ? :
110 0 13 if $@
124 5 8 if $options{'epoch'}
125 1 7 if $options{'object'}
130 0 7 if $@
137 6 1 if $epoch eq 'epoch'
143 0 7 if $@
151 2 1 if $object eq 'object'
157 3 0 if (my $time_zone = delete $options{'time_zone'})
158 3 0 if ($object->can('set_time_zone'))
165 0 3 if $@
167 3 0 if ($orig_time_zone)
190 4 9 if ($@) { }
205 1 0 unless ($self->{'parser'}{$pattern})
212 0 1 if ($@) { }
239 0 4 if $@
247 0 80 unless defined $self->{'config'}{$key}
248 0 80 if defined $options->{$key}
256 0 7 unless @_
257 0 3 if @_ == 1 and &blessed($_[0]) and $_[0]->isa('DateTime')
264 0 17 unless ($self->format($formatter))
276 20 0 if $options->{$key}
285 4 0 if $on_error eq 'ignore'
286 0 0 if ref $on_error eq 'CODE'