Condition Coverage

blib/lib/XML/Writer.pm
Criterion Covered Total %
condition 99 99 100.0


and 3 conditions

line !l l&&!r l&&r condition
109 86 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 63 29 14 $dataMode and $hasHeading || $elementLevel
273 66 36 1 $seen{'ELEMENT'} and $elementLevel == 0
36 64 2 $elementLevel == 0 and $seen{'DOCTYPE'}
64 1 1 $elementLevel == 0 and $seen{'DOCTYPE'} and $name ne $seen{'DOCTYPE'}
58 41 2 $dataMode and $hasData
290 62 5 14 $dataMode and $hasHeading || $elementLevel
309 44 35 1 $seen{'ELEMENT'} and $elementLevel == 0
35 40 4 $elementLevel == 0 and $seen{'DOCTYPE'}
40 3 1 $elementLevel == 0 and $seen{'DOCTYPE'} and $name ne $seen{'DOCTYPE'}
58 19 1 $dataMode and $hasData
329 45 16 20 $dataMode and $hasElement
343 1 73 1 $name and $name ne $oldName
365 29 11 1 $dataMode and $hasElement
394 5 4 1 $dataMode and $hasElement
475 1 172 3 defined $newOutput and not ref $newOutput
490 146 2 20 $outputEncoding and ref $output eq 'GLOB' || $output->isa('IO::Handle')
971 16 25 30 not $attFlag and $defaultPrefix
41 13 17 not $attFlag and $defaultPrefix and $uri eq $defaultPrefix
972 10 2 5 $nsDefaultDecl and $nsDefaultDecl eq $uri
1035 1 1 1 $defaultPrefix and $_ eq $defaultPrefix
1137 1 1 1 $defaultPrefix and $defaultPrefix eq $uri

or 2 conditions

line l !l condition
64 23 147 $params{'ENCODING'} || ''
489 167 1 $newOutput || \*STDOUT
544 7 163 $params{'DATA_INDENT'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
179 1 1 9 $name =~ /\?\>/ or defined $data and $data =~ /\?\>/
248 15 14 14 $hasHeading || $elementLevel
290 6 12 1 $hasHeading || $elementLevel
490 1 20 1 ref $output eq 'GLOB' || $output->isa('IO::Handle')