Branch Coverage

blib/lib/Syntax/Highlight/XML.pm
Criterion Covered Total %
branch 53 70 75.7


line true false branch
77 1 13 if $_[0]->is_pi
78 1 13 if $_[0]->is_doctype
79 8 6 if $_[0]->is_opening
80 6 8 if $_[0]->is_closing
81 0 14 if $_[0]->is_opening and $_[0]->is_closing
87 2 1 if $_[0]->name->spelling =~ /^xmlns\b/
88 0 3 if $_[0]->name->spelling =~ /^xml\b/
106 28 230 unless ref $regexp
108 72 186 if (my(@m) = ${$self->_remaining;} =~ /$regexp/)
120 0 86 unless defined $spelling
129 13 1 ${$self->_remaining;} =~ /^(.*?)</ms ? :
130 4 10 $data =~ /\S/ms ? :
137 6 0 if ${$self->_remaining;} =~ /^(".*?")/m
138 0 0 if ${$self->_remaining;} =~ /^('.*?')/m
157 0 0 if (blessed $thing and $thing->isa('RDF::Trine::Model') and $self->can('_serializer'))
163 0 0 if (blessed $thing and $thing->isa('RDF::Trine::Iterator') and $thing->can('as_xml'))
169 0 0 if (blessed $thing and $thing->isa('RDF::Trine::Iterator') and $self->can('_serializer'))
175 0 1 if (blessed $thing and $thing->isa('XML::LibXML::Node'))
181 0 1 unless (ref $thing eq 'SCALAR')
195 0 1 unless ref $self
207 14 72 if ($matches = $self->_peek(qr/^(<[?!]?)/)) { }
14 58 elsif ($TAG and $matches = $self->_peek(qr/^(\??>)/)) { }
8 50 elsif ($TAG and $matches = $self->_peek(qr/^(\s+)/s)) { }
14 36 elsif ($TAG and not $TAG->name and $matches = $self->_peek(qr/^((?:\w+[:])?\w+)/)) { }
6 30 elsif ($TAG and $TAG->name and $matches = $self->_peek(qr/^((?:\w+[:])?\w+)/)) { }
4 26 elsif ($TAG and $self->_peek('=')) { }
6 20 elsif ($TAG and $self->_peek('/')) { }
6 14 elsif ($TAG and $self->_peek(qr/^["']/)) { }
211 1 13 if ($$matches[0] =~ /\!/) { }
1 12 elsif ($$matches[0] =~ /\?/) { }
235 8 6 unless ($TAG->is_closing)
242 3 3 if ($TAG->is_pi or $TAG->is_doctype) { }
259 6 0 unless ($TAG->name)
267 3 3 if ($ATTR)
288 0 1 unless ref $self