Branch Coverage

blib/lib/Net/IPP/IPPAttribute.pm
Criterion Covered Total %
branch 38 86 44.1


line true false branch
95 0 0 if (ref $value eq 'HASH')
97 0 0 if (exists $$value{&TYPE})
100 0 0 if (not exists $$value{&VALUE}) { }
107 0 0 unless ($type)
108 0 0 if (exists $attributeTypes{$name}) { }
113 0 0 if ($name =~ /^(.*)\-(default|supported)$/)
116 0 0 if (exists $attributeTypes{$base}) { }
128 0 0 if (ref $value eq 'ARRAY') { }
135 0 0 if ($i == 0) { }
166 0 36 if ($type == &TEXT_WITHOUT_LANGUAGE or $type == &NAME_WITHOUT_LANGUAGE) { }
6 30 elsif ($type == &TEXT_WITH_LANGUAGE or $type == &NAME_WITH_LANGUAGE) { }
0 30 elsif ($type == &CHARSET or $type == &NATURAL_LANGUAGE or $type == &MIME_MEDIA_TYPE or $type == &KEYWORD or $type == &URI or $type == &URI_SCHEME) { }
10 20 elsif ($type == &BOOLEAN) { }
6 14 elsif ($type == &INTEGER or $type == &ENUM) { }
6 8 elsif ($type == &DATE_TIME) { }
4 4 elsif ($type == &RESOLUTION) { }
2 2 elsif ($type == &RANGE_OF_INTEGER) { }
2 0 elsif ($type == &OCTET_STRING) { }
0 0 elsif ($type == &BEG_COLLECTION) { }
0 0 elsif ($type == &END_COLLECTION or $type == &MEMBER_ATTR_NAME) { }
182 3 3 if ($decode) { }
183 0 3 if ($IPPAttribute::HP_BUGFIX) { }
209 5 5 if ($decode) { }
212 3 2 if ($value) { }
221 3 3 if ($decode) { }
230 3 3 if ($decode) { }
235 2 1 if ($value =~ /^\s*(\d+)\s*-\s*(\d+)\s*-\s*(\d+)\s*,\s*(\d+)\s*:\s*(\d+)\s*:\s*(\d+)\s*.\s*(\d+)\s*,\s*([\-\+])\s*(\d+)\s*:\s*(\d+)\s*$/) { }
252 2 2 if ($decode) { }
255 1 1 if ($unit == 3) { }
1 0 elsif ($unit == 4) { }
268 1 1 if ($unitText eq 'dpi') { }
1 0 elsif ($unitText eq 'dpc') { }
283 1 1 if ($decode) { }
295 0 0 if ($key)
315 0 0 if (not $key =~ /^[\w\-]*$/)
356 0 0 if ($offset + 2 + $keyLength > length $bytes)
364 0 0 if ($offset + 4 + $keyLength + $valueLength > length $bytes)
398 0 0 if ($IPPAttribute::HP_BUGFIX and $type == &TEXT_WITH_LANGUAGE || $type == &NAME_WITH_LANGUAGE) { }
423 0 0 if (&DEBUG)
424 0 0 if (not exists $attributeTypes{$key}) { }
0 0 elsif ($attributeTypes{$key} != $type) { }
436 0 0 if (not $key) { }
437 0 0 unless (ref $$group{$previousKey})