XML, the Perl Way

Branch Coverage

File: tools/xml_split/xml_split
Coverage: 68.8%

line % coverage branch
29 100 T F if ($$opt{'h'})
30 100 T F if ($$opt{'m'})
31 100 T F if ($$opt{'V'})
34 100 T F if ($$opt{'c'})
100 T F if ($$opt{'s'})
36 100 T F if ($$opt{'s'} =~ /^\s*(\d+)\s*(G[bo]?|M[bo]?|K[bo]?\s*)?$/i) { }
44 100 T F if $$opt{'s'}
100 T F if ($$opt{'g'}) { }
100 T F elsif ($$opt{'c'}) { }
45 100 T F if $$opt{'c'}
48 50 T F if $$opt{'l'}
52 100 T F $$opt{'i'} ? :
62 50 T F if (my $plugin = $$opt{'p'})
63 0 T F unless ($plugin =~ /^[\w:.-]+$/)
66 0 T F if ($@)
72 100 T F if ($$opt{'s'}) { }
100 T F elsif ($$opt{'g'}) { }
100 T F elsif ($$opt{'l'}) { }
78 50 T F if $$opt{'v'}
86 50 T F if $$opt{'v'}
93 50 T F if $$opt{'v'}
106 50 T F if (not @files) { }
118 50 T F unless ($$state{'base'})
133 50 T F if (not @files) { }
144 100 T F unless ($$state{'base'})
159 50 T F unless ($$state{'no_pi'})
161 50 T F if $$state{'verbose'}
162 50 T F unless open my $out, '>', $file_name
184 100 T F if ($p->depth == $$state{'level'})
188 50 T F if $$state{'verbose'}
189 50 T F unless open my $out, '>', $file_name
191 100 T F if ($$state{'xml_declaration'})
193 50 T F unless ($$state{'no_pi'})
196 50 T F if $$state{'current_fh'}
201 50 T F if $$state{'current_fh'}
202 100 T F if ($p->depth == $$state{'level'})
203 50 T F unless ($$state{'current_fh'} == $$state{'main_fh'})
212 50 T F if $$state{'current_fh'}
224 100 T F if ($p->depth == $$state{'level'} and not $$state{'current_size'})
229 50 T F if $$state{'verbose'}
230 50 T F unless open my $out, '>', $file_name
232 100 T F if $$state{'xml_declaration'}
235 50 T F unless ($$state{'no_pi'})
240 100 T F if $$state{'store_size'}
241 50 T F if $$state{'current_fh'}
247 50 T F if $$state{'store_size'}
248 50 T F if ($p->depth == $$state{'level'} and $$state{'current_size'} > $$state{'size'}) { }
249 0 T F if $$state{'current_fh'}
253 100 T F if ($p->depth < $$state{'level'})
254 50 T F if $$state{'current_fh'}
260 50 T F unless ($$state{'current_fh'} == $$state{'main_fh'})
272 100 T F if ($$state{'store_size'})
274 50 T F if ($p->depth < $$state{'level'})
276 50 T F if $$state{'current_fh'}
287 100 T F if ($p->depth == $$state{'level'})
288 100 T F unless ($$state{'current_nb'})
292 50 T F if $$state{'verbose'}
293 50 T F unless open my $out, '>', $file_name
300 50 T F unless ($$state{'no_pi'})
304 50 T F if $$state{'current_fh'}
309 100 T F if ($p->depth == $$state{'level'}) { }
310 50 T F if $$state{'current_fh'}
312 100 T F if ($$state{'current_nb'} == $$state{'group'})
315 100 T F if ($p->depth < $$state{'level'})
316 50 T F if $$state{'current_fh'}
322 100 T F unless $$options{'no_nl'}
323 100 T F unless ($$state{'current_fh'} == $$state{'main_fh'})
333 50 T F if $$state{'current_fh'}
338 0 T F if $$state{'current_fh'}
360 50 T F unless ($$state{'no_pi'})
362 50 T F if $$state{'verbose'}
363 50 T F unless open my $out, '>', $file_name
379 50 T F if $$state{'verbose'}
386 50 T F if (not $$state{'no_pis'}) { }
393 100 T F if ($elt->inherited_att('#in_fragment')) { }
406 50 T F unless open my $out, '>', $file_name
416 50 T F unless ($$state{'no_pi'})
462 100 T F if ($$state{'xinclude'}) { }
483 100 T F if ($$state{'xinclude'}) { }
485 100 T F if ($subdocs)