Branch Coverage

blib/lib/Image/MetaData/JPEG/parsers/app1_xmp.pl
Criterion Covered Total %
branch 52 118 44.0


line true false branch
40 0 1 unless $1 eq $Image::MetaData::JPEG::Segment::APP1_XMP_TAG
67 48 2 unless ref $$regexps_array[0] eq 'ARRAY'
70 1 51 unless exists $$this{'private_list'}[$pos]
75 0 102 unless @$elements
77 14 88 unless @matches
103 2 8 if $extra
134 1 0 unless exists $$this{'private_list'}
142 0 7 if $p
148 15 2 if (substr($$string, 0, 1) eq '<') { }
151 6 9 if ($s eq '/' and $$string =~ s[^][]o) { }
0 9 elsif ($s eq '!' and $$string =~ s/^//o) { }
3 6 elsif ($s eq '?' and $$string =~ s/^<\?($mkp_tag) ?([^\?]*?)\?>//o) { }
6 0 elsif ($$string =~ s[^<($mkp_tag) ?([^\?]*?)(/?)>][]o) { }
152 0 6 if $f
158 3 0 if $2
162 0 6 $3 ? :
4 2 if $2
163 0 6 $3 ? :
165 0 0 if $string
169 16 1 $$string ? :
212 0 1 unless $this->list_extract(['OPEN_SPECIAL', 'xpacket'])
214 0 1 unless $this->list_extract(['ATTRIBUTE', 'begin', $Image::MetaData::JPEG::Segment::APP1_XMP_XPACKET_BEGIN])
216 0 1 unless $this->list_extract(['ATTRIBUTE', 'id', $Image::MetaData::JPEG::Segment::APP1_XMP_XPACKET_ID])
221 0 1 unless $this->list_extract(['ATTRIBUTE', 'end', '(w|r)', \$rw], -1)
223 0 1 unless $this->list_extract(['OPEN_SPECIAL', 'xpacket'], -1)
231 0 1 unless $this->list_extract(['OPEN', '(x:x[am]pmeta)', \$meta])
233 0 1 unless $this->list_extract(['CLOSE', $meta], -1)
235 0 1 unless $this->list_extract(['ATTRIBUTE', 'xmlns:x', $Image::MetaData::JPEG::Segment::APP1_XMP_META_NS])
238 0 1 unless $this->list_extract(['OPEN', 'rdf:RDF'])
242 0 1 unless $this->list_extract(['ATTRIBUTE', 'xmlns:rdf', $Image::MetaData::JPEG::Segment::APP1_XMP_OUTER_RDF_NS])
244 0 1 unless $this->list_extract(['CLOSE', 'rdf:RDF'], -1)
252 0 1 if grep {$_ ne $abouts[0];} @abouts
284 0 2 unless $this->list_extract(['(OPEN.*)', \$type, 'rdf:Description'])
287 0 2 unless $this->list_extract(['ATTRIBUTE', '(rdf:|)about', '.*'])
290 0 2 unless $this->list_equal(['ATTRIBUTE', 'xmlns:.*', '.*'])
295 2 0 unless $$nss{$_} =~ /\#$/ or defined $ns
297 0 2 if $type eq 'OPEN_ABBR'
302 2 0 unless ($this->list_extract(['CONTENT', '\\s*']))
306 0 2 unless $this->list_extract(['CLOSE', 'rdf:Description'])
321 0 0 unless $this->parse_comment($ns, $pdir) or $this->parse_rdf_simple_property($ns, $pdir) or $this->parse_rdf_struct_property($ns, $pdir) or $this->parse_rdf_array_property($ns, $pdir)
337 2 0 unless $this->list_extract(['COMMENT', '(.*)', \$comment])
359 0 2 if $this->list_equal([['OPEN', '.*'], ['OPEN', 'rdf:.*']])
361 0 2 unless $this->list_extract(['OPEN', "(${ns}:.*)", \$name])
365 2 0 if ($this->list_extract(['CONTENT', '(.*)', \$content])) { }
377 0 2 unless $this->list_extract(['CLOSE', "$name"])
397 0 0 unless $this->list_extract(['OPEN', "${ns}:(.*)", \$name], ['OPEN', 'rdf:Description'], ['ATTRIBUTE', 'xmlns:(.*)', \$ns_2, '(.*)', \$ns_2_v])
406 0 0 unless $this->list_extract(['CLOSE', $name])
432 0 0 unless $this->list_extract([['OPEN', "(${ns}:.*)", \$name], ['OPEN', '(rdf:(Bag|Seq|Alt))', \$type]])
436 0 0 if $this->parse_rdf_item([@$pdir, $name])
437 0 0 if $this->parse_rdf_item_lang([@$pdir, $name])
438 0 0 if $this->parse_rdf_item_property([@$pdir, $name])
439 0 0 if $this->parse_rdf_item_qualified([@$pdir, $name])
444 0 0 unless $this->list_extract([['CLOSE', $type], ['CLOSE', "$name"]])
458 0 0 unless $this->list_extract([['OPEN', 'rdf:li'], ['CONTENT', '(.*)', \$content], ['CLOSE', 'rdf:li']])
476 0 0 unless $this->list_equal([['OPEN', 'rdf:li'], ['ATTRIBUTE', 'rdf:.*', '.*'], ['OPEN', '.*']])
484 0 0 unless $this->list_extract(['CLOSE', 'rdf:li'])
508 0 0 unless $this->list_extract([['OPEN', 'rdf:li'], ['OPEN', 'rdf:Description'], ['OPEN', 'rdf:value'], ['CONTENT', '(.*)', \$value], ['CLOSE', 'rdf:value']])
516 0 0 unless $this->list_extract([['CLOSE', 'rdf:Description'], ['CLOSE', 'rdf:li']])
531 0 0 unless $this->list_extract([['OPEN', 'rdf:li'], ['ATTRIBUTE', 'xml:lang', '(.*)', \$language], ['CONTENT', '(.*)', \$content], ['CLOSE', 'rdf:li']])