Condition Coverage

lib/Template/Plugin/XML/File.pm
Criterion Covered Total %
condition 2 12 16.6


and 3 conditions

line !l l&&!r l&&r condition
25 0 4 8 @_ && ref $_[-1] eq 'HASH'
77 0 0 0 @_ && ref $_[-1] eq 'HASH'

or 3 conditions

line l !l&&r !l&&!r condition
79 0 0 0 $$self{'dom'} ||= do { my($parser, $dom); if ($parser = $$self{'libxml'}) { if (defined $$self{'name'}) { $self->throw("failed to parse $$self{'name'}: $@") unless eval { do { $dom = $parser->parse_file($$self{'name'}) } }; } else { $self->throw("failed to parse file handle: $@") unless eval { do { $dom = $parser->parse_fh($$self{'handle'}) } }; } ; } else { $self->throw("XML::DOM not available: $@") unless eval { do { require XML::DOM } }; $parser = 'XML::DOM::Parser'->new(%$args) || $self->throw('failed to create parser'); if (defined $$self{'name'}) { $self->throw("failed to parse $$self{'name'}: $@") unless eval { do { $dom = $parser->parsefile($$self{'name'}) } }; } else { local $/ = undef; my $fh = $$self{'handle'}; my $text = <$fh>; $self->throw("failed to parse $$self{'name'}: $@") unless eval { do { $dom = $parser->parse($text) } }; } ; } ; $dom }
98 0 0 0 'XML::DOM::Parser'->new(%$args) || $self->throw('failed to create parser')