Branch Coverage

lib/Web/DataService/Format.pm
Criterion Covered Total %
branch 15 64 23.4


line true false branch
66 2 2 if (ref $item eq 'HASH') { }
2 0 elsif (not ref $item) { }
72 0 2 unless defined $name
76 0 2 if defined $ds->{'format'}{$name}
84 0 8 unless $FORMAT_DEF{$k}
88 0 0 if ($k eq 'default_vocab' and defined $v and $v ne '')
91 0 0 unless ref $ds->{'vocab'}{$v}
94 0 0 if $ds->{'vocab'}{$v}{'disabled'} and not $item->{'disabled'}
103 0 2 if $name eq 'txt' or $name eq 'tsv' or $name eq 'csv'
105 1 1 if $record->{'content_type'} =~ /(x(?:ht)?ml|text|json|javascript)/ or $record->{'encode_as_text'}
108 0 2 unless $record->{'content_type'}
114 0 2 unless defined $record->{'package'}
120 2 0 if ($record->{'module'} and not $record->{'disabled'})
124 2 0 unless $filename =~ /\.pm$/
132 2 0 unless $record->{'disabled'}
149 0 1 unless $last_node
201 0 0 unless ref $ds->{'format_list'} eq 'ARRAY'
211 0 0 if ($path eq '/') { }
214 0 0 unless @formats
221 0 0 unless ref $allowed eq 'HASH'
224 0 0 if $allowed->{$_}
225 0 0 unless @formats
232 0 0 $ds->has_feature('format_suffix') ? :
233 0 0 $options->{'extended'} || !@paths ? :
234 0 0 @paths ? :
244 0 0 if $frec->{'doc_node'}
245 0 0 $ds->has_feature('format_suffix') ? :
247 0 0 if $frec->{'undocumented'}
250 0 0 if $doc_link and @paths and $options->{'extended'}
253 0 0 if ($options->{'extended'} or not @paths) { }
0 0 elsif ($doc_link) { }
255 0 0 if $frec->{'doc_string'}