Condition Coverage

blib/lib/XML/Generator.pm
Criterion Covered Total %
condition 79 99 79.8


and 3 conditions

line !l l&&!r l&&r condition
497 14 0 1 ref $type and defined $tag_factory{$type}
533 17 0 0 $tag =~ /^xml/ and $this->{'conformance'} eq "strict"
547 8 0 2 $STACKED and not defined *{"${pkg}::import";}{"CODE"}
599 32 24 1 $options{'conformance'} eq "strict" and $options{'empty'} eq "ignore"
629 53 2 1 $options{'xml'} and ref $options{'xml'} ne "HASH"
634 7 1 0 @{$options{'namespace'};} > 2 and @{$options{'namespace'};} % 2 != 0
641 31 1 23 $options{'conformance'} eq "strict" and $options{'filter_invalid_chars'} eq ""
1110 2 47 3 defined $_ && $_ eq '#default'
1111 27 3 0 @$namespace > 2 and @$namespace % 2 != 0
1118 1 34 0 defined $_ && $_ eq '#default'
1208 0 120 25 $namespace and defined $namespace->[0]
1213 0 0 40 defined $k and defined $v
1216 17 2 0 $prefix and $this->{'qualified_attributes'}
1237 91 0 3 $empty eq "args" and @args == 1
91 2 1 $empty eq "args" and @args == 1 and not defined $args[0]
1251 21 1 33 UNIVERSAL::isa($arg, "XML::Generator::overload") and not UNIVERSAL::isa($arg, "XML::Generator::pi")
1292 92 2 16 UNIVERSAL::isa($arg, "XML::Generator::overload") and not UNIVERSAL::isa($arg, 'XML::Generator::cdata') || UNIVERSAL::isa($arg, 'XML::Generator::pi')
1365 29 18 0 not @{$o->[0];} || $sawDefault and grep {not defined $$namespace[$_ * 2] if defined $$namespace[$_ * 2 + 1];} 0 .. $#$namespace / 2
1405 20 56 1 $f & 16 and $f & 8
1448 2 0 1 $this->{'allowed_xml_tags'} && grep({$_ eq $name;} @{$$this{'allowed_xml_tags'};})

or 2 conditions

line l !l condition
802 5 5 ($this->{'xml'}{'version'} // $this->{'version'}) || '1.0'
831 4 6 $encoding ||= ""
832 9 1 $version ||= ""
833 9 1 $standalone ||= ""
863 2 8 shift() || (return undef)
1165 151 0 shift() || (return undef)
1384 0 0 shift() || (return undef)
1516 21 3 $uri ||= ""
1522 0 198 $, || ''

or 3 conditions

line l !l&&r !l&&!r condition
806 2 3 5 $this->{'xml'}{'encoding'} // $this->{'encoding'}
812 1 1 8 $this->{'xml'}{'dtd'} // $this->{'dtd'}
916 1 1 6 UNIVERSAL::isa($arg, "XML::Generator::comment") or UNIVERSAL::isa($arg, "XML::Generator::pi")
1180 55 18 72 $escape or $filter
1236 93 1 51 @args or $empty eq "close"
1292 0 2 16 UNIVERSAL::isa($arg, 'XML::Generator::cdata') || UNIVERSAL::isa($arg, 'XML::Generator::pi')
1365 29 0 18 @{$o->[0];} || $sawDefault