Condition Coverage

blib/lib/XML/Writer.pm
Criterion Covered Total %
condition 102 108 94.4


and 3 conditions

line !l l&&!r l&&r condition
109 85 1 1 $use_selfcontained_output and defined wantarray
128 20 1 1 $standalone and $standalone ne 'no'
175 8 2 1 $name =~ /^xml/i and not $name =~ /^xml-(stylesheet|model)$/i
179 5 4 1 defined $data and $data =~ /\?\>/
190 5 4 5 $dataMode and $elementLevel
195 5 4 5 $dataMode and $elementLevel
248 62 43 0 $dataMode and $hasHeading || $elementLevel
272 66 36 1 $seen{'ELEMENT'} and $elementLevel == 0
36 64 2 $elementLevel == 0 and $seen{'DOCTYPE'}
100 1 1 $elementLevel == 0 and $seen{'DOCTYPE'} and $name ne $seen{'DOCTYPE'}
58 41 2 $dataMode and $hasData
289 59 19 0 $dataMode and $hasHeading || $elementLevel
307 42 35 1 $seen{'ELEMENT'} and $elementLevel == 0
35 38 4 $elementLevel == 0 and $seen{'DOCTYPE'}
73 3 1 $elementLevel == 0 and $seen{'DOCTYPE'} and $name ne $seen{'DOCTYPE'}
56 19 1 $dataMode and $hasData
327 44 16 20 $dataMode and $hasElement
341 1 73 1 $name and $name ne $oldName
363 29 11 1 $dataMode and $hasElement
392 5 4 1 $dataMode and $hasElement
473 1 160 2 defined $newOutput and not ref $newOutput
161 0 2 defined $newOutput and not ref $newOutput and 'self' eq $newOutput
484 141 15 0 $outputEncoding and ref $output eq 'GLOB' || $output->isa('IO::Handle')
917 24 10 12 $clashMap{$prefix} and $clashMap{$prefix} ne $uri
935 16 25 30 not $attFlag and $defaultPrefix
41 13 17 not $attFlag and $defaultPrefix and $uri eq $defaultPrefix
936 10 2 5 $nsDefaultDecl and $nsDefaultDecl eq $uri
999 1 1 1 $defaultPrefix and $_ eq $defaultPrefix
1101 1 1 1 $defaultPrefix and $defaultPrefix eq $uri

or 2 conditions

line l !l condition
64 16 141 $params{'ENCODING'} || ''
483 155 1 $newOutput || \*STDOUT
538 7 150 $params{'DATA_INDENT'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
179 1 0 10 $name =~ /\?\>/ or defined $data and $data =~ /\?\>/
248 15 14 14 $hasHeading || $elementLevel
289 6 12 1 $hasHeading || $elementLevel
484 1 13 1 ref $output eq 'GLOB' || $output->isa('IO::Handle')
917 24 0 46 not defined $prefix or $clashMap{$prefix} and $clashMap{$prefix} ne $uri