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 ""
1111 2 47 3 defined $_ && $_ eq '#default'
1112 27 3 0 @$namespace > 2 and @$namespace % 2 != 0
1119 1 34 0 defined $_ && $_ eq '#default'
1209 0 120 25 $namespace and defined $namespace->[0]
1214 0 0 40 defined $k and defined $v
1217 17 2 0 $prefix and $this->{'qualified_attributes'}
1238 91 0 3 $empty eq "args" and @args == 1
91 2 1 $empty eq "args" and @args == 1 and not defined $args[0]
1252 21 1 33 UNIVERSAL::isa($arg, "XML::Generator::overload") and not UNIVERSAL::isa($arg, "XML::Generator::pi")
1293 92 2 16 UNIVERSAL::isa($arg, "XML::Generator::overload") and not UNIVERSAL::isa($arg, 'XML::Generator::cdata') || UNIVERSAL::isa($arg, 'XML::Generator::pi')
1366 29 18 0 not @{$o->[0];} || $sawDefault and grep {not defined $$namespace[$_ * 2] if defined $$namespace[$_ * 2 + 1];} 0 .. $#$namespace / 2
1406 20 56 1 $f & 16 and $f & 8
1449 2 0 1 $this->{'allowed_xml_tags'} && grep({$_ eq $name;} @{$$this{'allowed_xml_tags'};})

or 2 conditions

line l !l condition
802 6 5 ($this->{'xml'}{'version'} // $this->{'version'}) || '1.0'
832 5 6 $encoding ||= ""
833 10 1 $version ||= ""
834 4 7 $standalone ||= ""
864 2 9 shift() || (return undef)
1166 151 0 shift() || (return undef)
1385 0 0 shift() || (return undef)
1517 21 3 $uri ||= ""
1523 0 198 $, || ''

or 3 conditions

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