Branch Coverage

blib/lib/DateTime/Format/Genealogy.pm
Criterion Covered Total %
branch 45 58 77.5


line true false branch
65 0 11 unless defined $class
89 8 28 if (not ref $self) { }
1 27 elsif (ref $self eq 'HASH') { }
6 21 elsif (ref $_[0] eq 'HASH') { }
1 20 elsif (ref $_[0]) { }
6 14 elsif (scalar @_ and scalar(@_) % 2 == 0) { }
90 5 3 if (scalar @_)
108 23 3 if (my $date = $params{'date'}) { }
110 3 20 if ($date =~ /^bef\s/i or $date =~ /^aft\s/i)
111 2 1 unless $quiet
115 1 19 if ($date =~ /^31 Nov/)
120 11 8 unless (defined $dfn)
123 1 18 if ($date =~ /^\s*(.+\d\d)\s*\-\s*(.+\d\d)\s*$/)
127 3 16 if ($date =~ /^bet (.+) and (.+)/i)
128 1 2 if (wantarray)
133 16 0 if (not $date =~ /^\d{3,4}$/)
134 3 13 if ($date =~ /^(\d{1,2})\s+([A-Z]{4,}+)\s+(\d{3,4})$/i)
135 1 2 if (not $strict and my $abbrev = $months{$2}) { }
138 2 0 unless $quiet
141 14 0 if ($date =~ /^\d/ and my $d = $self->_date_parser_cached($date))
144 0 0 if (not $date =~ /^(Abt|ca?)/i and $date =~ /^[\w\s]+$/)
147 0 0 if (my $rc = $dfn->parse_datetime($date))
165 0 14 if (ref $_[0] eq 'HASH') { }
0 14 elsif (ref $_[0]) { }
0 14 elsif (scalar(@_) % 2 == 0) { }
177 2 12 if ($self->{'all_dates'}{$date})
181 10 2 unless (defined $date_parser)
189 0 12 if (my $error = $date_parser->error)
193 12 0 if ($d and ref $d eq 'ARRAY')