Branch Coverage

blib/lib/DateTime/Format/Pg.pm
Criterion Covered Total %
branch 65 88 73.8


line true false branch
92 2 0 if ($_ eq 'european') { }
0 0 elsif ($_ eq 'server_tz') { }
104 12 2 if exists $param{'european'}
105 2 0 if ref $self
110 0 0 if ref($param{'server_tz'}) =~ /TimeZone/
111 0 0 if exists $param{'server_tz'}
119 0 2 if (ref $class)
143 0 0 unless ref $self
152 3 3 if ($p{'sign'}) { }
302 7 32 if ($era =~ /BC/)
312 7 7 if ($args{'self'}->european(@{$args{'args'};}))
330 0 0 $args{'parsed'}{'month'} ? :
337 2 20 $args{'args'} ? :
339 2 20 if ($param{'_force_tz'}) { }
6 14 elsif (not defined $args{'parsed'}{'time_zone'}) { }
14 0 elsif ($args{'parsed'}{'time_zone'} =~ /^([-\+])(\d+)(?::(\d+))?(?::(\d+))?$/) { }
347 2 4 if ($args{'parsed'}{'year'} < 1901 or $args{'parsed'}{'year'} == 1901 and $args{'parsed'}{'month'} < 12 || $args{'parsed'}{'day'} < 14 or $args{'parsed'}{'year'} > 2038 or $args{'parsed'}{'year'} == 2038 and $args{'parsed'}{'month'} > 1 || $args{'parsed'}{'day'} > 18) { }
368 10 4 if (length $2 == 2) { }
384 0 0 $args{'args'} ? :
395 8 14 if (defined $args{'parsed'}{'nanosecond'}) { }
629 8 81 if ($string =~ s/ago//)
643 98 76 if (length $unit != 1)
648 1 173 unless ($udata)
653 1 172 if (exists $done{$key})
661 2 170 if ($amount =~ s/\.(\d+)$//)
667 0 2 if ($base_unit ne 'seconds')
675 1 1 $amount > 0 ? :
682 2 85 if ($string =~ /\S/)
731 3 8 $ns ? :
761 1 10 if $dt->time_zone->is_floating
784 2 3 if ($dt->is_infinite) { }
1 2 elsif ($dt->year <= 0) { }
785 1 1 $dt->isa('DateTime::Infinite::Future') ? :
810 2 0 if ($dt->is_infinite) { }
0 0 elsif ($dt->year <= 0) { }
811 1 1 $dt->isa('DateTime::Infinite::Future') ? :
843 2 11 if ($dt->is_infinite) { }
2 9 elsif ($dt->year <= 0) { }
844 1 1 $dt->isa('DateTime::Infinite::Future') ? :
874 5 0 if UNIVERSAL::isa($_[0], 'DateTime::Format::Pg') or $_[0] eq 'DateTime::Format::Pg'
876 0 5 unless UNIVERSAL::isa($du, 'DateTime::Duration')
881 2 3 if ($deltas{'nanoseconds'})
888 8 12 if $deltas{$_}
891 0 5 if length $output <= 2