Condition Coverage

blib/lib/Treex/PML/Instance/Reader.pm
Criterion Covered Total %
condition 127 328 38.7


and 3 conditions

line !l l&&!r l&&r condition
38 0 6 0 not $ENV{'PML_COMPILE_NO_XS'} and eval { do { require XML::CompactTree::XS; 'XML::CompactTree::XS'->import; $Treex::PML::Instance::Reader::HAVE_XS = 1; 1 } }
110 20 0 41 &blessed($schema_file) and $schema_file->isa('URI')
127 24 23 14 $cached and $schema_cache[-1] ne $schema_file
152 24 23 14 $cached and $handler_cache[-1][1] ne $subkey
180 39 22 0 $config and ref(my $load_opts = $config->get_data('options/load'))
183 0 39 22 not $Treex::PML::Instance::DEBUG and $config
39 22 0 not $Treex::PML::Instance::DEBUG and $config and defined $config->get_data('options/debug')
229 0 0 0 defined $id and length $id
238 39 0 22 $config && $config->get_root
243 0 0 0 $config and $config->get_root
251 0 0 0 $in_xsl && $in_xsl->{'type'}
252 0 0 0 $type and $type =~ /^(?:xslt|perl|pipe|shell)$/
255 0 0 0 $test || $transform->{'ns'} || $transform->{'root'} and !$transform->{'ns'} || $transform->{'ns'} eq $root_ns
0 0 0 $test || $transform->{'ns'} || $transform->{'root'} and !$transform->{'ns'} || $transform->{'ns'} eq $root_ns and !$transform->{'root'} || $transform->{'root'} eq $root_element
0 0 0 $test || $transform->{'ns'} || $transform->{'root'} and !$transform->{'ns'} || $transform->{'ns'} eq $root_ns and !$transform->{'root'} || $transform->{'root'} eq $root_element and not $test
274 0 0 0 $dom and $dom->can('setBaseURI')
275 0 0 0 $dom and $dom->can('setURI')
292 0 0 0 &blessed($dom) and $dom->isa('XML::LibXML::Document')
294 0 0 0 $dom and $dom->can('setBaseURI')
295 0 0 0 $dom and $dom->can('setURI')
372 61 0 0 defined $sel_knit and ref $sel_knit ne 'HASH'
374 61 0 0 defined $sel_refs and ref $sel_refs ne 'HASH'
447 0 0 61 $reader->localName eq 'head' and $reader->namespaceURI eq 'http://ufal.mff.cuni.cz/pdt/pml/'
464 121 0 86 $type == 1 and $reader->namespaceURI eq 'http://ufal.mff.cuni.cz/pdt/pml/'
475 0 0 61 defined $schema_file and length $schema_file
507 55 0 30 $reader->localName eq 'reffile' and $reader->namespaceURI eq 'http://ufal.mff.cuni.cz/pdt/pml/'
511 0 0 30 defined $id and length $id
0 0 30 defined $id and length $id and defined $href
0 0 30 defined $id and length $id and defined $href and length $href
513 0 0 30 defined $name and length $name
649 212 0 0 $prefix and $prefix eq 'xmlns'
0 151 61 not $prefix and $name eq 'xmlns'
697 0 0 24 $cdecl and $cdecl->get_decl_type == 8
0 18 6 $cdecl and $cdecl->get_decl_type == 8 and $cdecl->get_format eq 'ID'
700 0 0 18 $cdecl and $cdecl->get_decl_type == 8
0 18 0 $cdecl and $cdecl->get_decl_type == 8 and $cdecl->get_format eq 'ID'
729 0 0 10 $idM && $idM->get_name
881 0 247 2 $mdecl and $mdecl->get_decl_type == 10
883 0 85 0 $mdecl and $mdecl->get_role eq '#TREES'
898 0 51 283 $KNIT and not $role
900 0 250 33 $mdecl and $mdecl->get_decl_type == 6
250 24 9 $mdecl and $mdecl->get_decl_type == 6 and $mdecl->get_role eq '#KNIT'
934 108 179 3 not $trees_type and $role eq '#TREES'
287 3 0 not $trees_type and $role eq '#TREES' and $BUILD_TREES
279 1 0 $role eq '#KNIT' and $KNIT
943 0 0 3 $cmdecl and ($cmdecl->get_role || '') eq '#NODE'
0 3 0 $cmdecl and ($cmdecl->get_role || '') eq '#NODE' and $cmdecl_type == 3 || $cmdecl_type == 4
986 81 0 7 $decl->get_role eq '#NODE' and $BUILD_TREES
997 0 7 0 $cmdecl->get_role eq '#NODE' and $cmdecl_type == 3 || $cmdecl_type == 4
1020 0 0 0 $cmdecl->get_role eq '#NODE' and $cmdecl_type == 3 || $cmdecl_type == 4
1067 0 0 35 $cdecl && $cdecl->get_decl_path
1114 18 0 17 $decl->get_role eq '#NODE' and $BUILD_TREES
1119 0 7 10 $cdecl and ($cdecl->get_role || '') eq '#CHILDNODES'
1124 0 2 0 $cmdecl->get_role eq '#NODE' and $cmdecl_type == 3 || $cmdecl_type == 4
1147 0 0 12 $cmdecl->get_role eq '#NODE' and $cmdecl_type == 3 || $cmdecl_type == 4
1226 0 26 9 $VALIDATE_SEQUENCES and $content_pattern
1233 5 20 10 not $trees_type and $decl->get_role eq '#TREES'
25 0 10 not $trees_type and $decl->get_role eq '#TREES' and $BUILD_TREES
1291 29 16 0 not $trees_type and $decl->get_role eq '#TREES'
45 0 0 not $trees_type and $decl->get_role eq '#TREES' and $BUILD_TREES
1293 0 0 0 $cdecl and ($cdecl->get_role || '') eq '#NODE'
0 0 0 $cdecl and ($cdecl->get_role || '') eq '#NODE' and $cdecl_type == 3 || $cdecl_type == 4
1388 213 0 0 $VALIDATE_CDATA and $decl->get_format ne 'any'
1512 93 249 85 $decl_type == 12 and $decl->is_required
1519 85 0 0 $mdecl->get_role eq '#TREES' and $mdecl == $trees_type
1524 0 0 0 not $have_trees and $BUILD_TREES
1526 0 0 0 $have_trees and not defined $ret
1538 0 0 199 $mdecl && $mdecl->get_decl_path

or 2 conditions

line l !l condition
92 0 61 $VALIDATE_CDATA || 0
61 0 $VALIDATE_SEQUENCES || 0
61 0 $BUILD_TREES || 0
61 0 $LOAD_REFFILES || 0
61 0 $KNIT || 0
111 41 0 $schema_file->scheme || ''
240 61 0 $reader->namespaceURI || ''
242 0 0 $_->{'root'} || ''
0 0 $_->{'ns'} || ''
271 0 0 $xslt->parse_stylesheet_file($in_xsl_href) || die("Cannot locate XSL stylesheet '${in_xsl_href}' for transformation $id\n")
347 0 0 $reader->namespaceURI || ''
348 0 0 $ctxt->{'_filename'} || ''
349 0 0 $reader->localName || ''
0 0 $reader->namespaceURI || ''
358 61 0 $schema->{'version'} || ''
413 61 0 $handlers{'#cleanup'} || sub { }
500 0 0 $ctxt->{'_filename'} || 'document'
590 0 0 $ns{'http://ufal.mff.cuni.cz/pdt/pml/'} || -1
598 61 0 $ns{'http://ufal.mff.cuni.cz/pdt/pml/'} || -1
805 0 61 $instance->{'_id_prefix'} || ''
943 3 0 $cmdecl->get_role || ''
1119 10 7 $cdecl->get_role || ''
1293 0 0 $cdecl->get_role || ''

or 3 conditions

line l !l&&r !l&&!r condition
241 0 0 61 $root_ns ne 'http://ufal.mff.cuni.cz/pdt/pml/' or grep {($_->{'root'} || '') eq $root_element if ($_->{'ns'} || '') eq 'http://ufal.mff.cuni.cz/pdt/pml/';} @transform_map
255 0 0 0 $test || $transform->{'ns'} || $transform->{'root'}
0 0 0 !$transform->{'ns'} || $transform->{'ns'} eq $root_ns
0 0 0 !$transform->{'root'} || $transform->{'root'} eq $root_element
0 0 0 $test || $transform->{'ns'} || $transform->{'root'} and !$transform->{'ns'} || $transform->{'ns'} eq $root_ns and !$transform->{'root'} || $transform->{'root'} eq $root_element and not $test or eval { do { $dom->find($test) } }
259 0 0 0 $type eq 'pipe' or $type eq 'shell'
402 0 0 61 $opts->{'dump_handlers'} or $ENV{'PML_COMPILE_DUMP'}
565 0 0 0 -d $dir or mkdir $dir
612 0 30 0 $ctxt->{'_trees'} ||= 'Treex::PML::Factory'->createList
613 0 30 0 $ctxt->{'_pml_prolog'} ||= 'Treex::PML::Factory'->createSeq
614 0 30 0 $ctxt->{'_pml_epilog'} ||= 'Treex::PML::Factory'->createSeq
649 0 61 151 $prefix and $prefix eq 'xmlns' or not $prefix and $name eq 'xmlns'
815 42 334 743 $decl_type == 11 or $decl_type == 12
376 186 557 $decl_type == 11 or $decl_type == 12 or $decl_type == 1
520 51 506 $decl_type == 11 or $decl_type == 12 or $decl_type == 1 or $decl_type == 13
899 283 0 0 $mdecl ||= $member->get_content_decl
937 3 0 0 $mdecl ||= $member->get_content_decl
943 3 0 0 $cmdecl_type == 3 || $cmdecl_type == 4
997 7 0 0 $cmdecl_type == 3 || $cmdecl_type == 4
1020 0 0 0 $cmdecl_type == 3 || $cmdecl_type == 4
1124 2 0 0 $cmdecl_type == 3 || $cmdecl_type == 4
1147 0 12 0 $cmdecl_type == 3 || $cmdecl_type == 4
1293 0 0 0 $cdecl_type == 3 || $cdecl_type == 4
1504 42 334 743 $decl_type == 11 or $decl_type == 12
376 51 692 $decl_type == 11 or $decl_type == 12 or $decl_type == 13
1537 6 193 0 $mdecl ||= $decl->get_content_decl