Branch Coverage

blib/lib/HTTP/OAI/Repository.pm
Criterion Covered Total %
branch 14 42 33.3


line true false branch
71 0 9 unless defined $verb
73 0 9 unless my $grm = $grammer{$verb}
75 0 9 if (defined $params{'from'} and defined $params{'until'})
76 0 0 if (granularity($params{'from'}) ne granularity($params{'until'}))
87 24 0 unless $type == 2 and defined $params{$arg}
89 0 0 if (my $err = &$valid_func($params{$arg}))
97 0 0 if (%params) { }
114 7 17 if ($params{$arg})
115 0 7 if (my $err = &$valid_func($params{$arg}))
119 0 6 if ($type == 1 and !defined($params{$arg}) || $params{$arg} eq '')
125 0 9 if (%params) { }
140 0 0 if $date =~ /^\d{4}-\d{2}-\d{2}$/
141 0 0 if $date =~ /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/
146 0 1 unless $date =~ /^(\d{4})-(\d{2})-(\d{2})(T\d{2}:\d{2}:\d{2}Z)?$/
148 0 1 if $m < 1 or $m > 12
149 0 1 if $d < 1 or $d > 31
155 0 0 (shift()) =~ /^(\d{4})\-([01][0-9])\-([0-3][0-9])T([0-2][0-9]):([0-5][0-9]):([0-5][0-9])[\+\-]([0-2][0-9]):([0-5][0-9])$/ ? :
162 0 0 (shift()) =~ /^([A-Za-z0-9])+(:[A-Za-z0-9]+)*$/ ? :
169 0 0 (shift()) =~ /^([A-Za-z0-9_!'\$\(\)\+\-\.\*])+(:[A-Za-z0-9_!'\$\(\)\+\-\.\*]+)*$/ ? :
176 5 0 (shift()) =~ /^[A-Za-z0-9\-_\.!\~\*\'\(\)]+$/ ? :
185 1 0 (shift()) =~ /^[[:alpha:]][[:alnum:]\+\-\.]*:.+/ ? :