Branch Coverage

blib/lib/XML/SAX/Writer.pm
Criterion Covered Total %
branch 30 36 83.3


line true false branch
32 0 7 ref $_[0] ? :
33 4 3 @_ == 1 ? :
39 4 3 exists $$opt{'EncodeFrom'} ? :
40 4 3 exists $$opt{'EncodeTo'} ? :
69 10 3 if (lc $$self{'EncodeFrom'} ne lc $$self{'EncodeTo'}) { }
87 3 10 if ($ref eq 'SCALAR') { }
1 9 elsif ($ref eq 'CODE') { }
1 8 elsif ($ref eq 'ARRAY') { }
4 4 elsif ($ref eq 'GLOB' or UNIVERSAL::isa(\$$self{'Output'}, 'GLOB') or UNIVERSAL::isa($$self{'Output'}, 'IO::Handle')) { }
1 3 elsif (not $ref) { }
2 1 elsif (UNIVERSAL::can($$self{'Output'}, 'output')) { }
175 1 7 if (not defined $out and defined $str)
310 0 4 unless print $fh pop()
337 0 3 unless defined $file
343 0 3 unless open XFH, ">$file"
388 7 0 if $$self{'from_enc'}
389 7 0 if $$self{'to_enc'}
391 1 6 if ($@)