| line | % | coverage | condition |
| 130 | 33 | | eval 'require Scalar::Util' and defined \&Scalar::Util::weaken |
| 436 | 100 | | $args{'EltClass'} || 'XML::Twig::Elt' |
| 467 | 20 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| not $args{'NoLWP'} and not _use('URI') and not _use('URI::File') and not _use('LWP') |
| 490 | 100 | | $$self{'twig_roots'} or $args{'ForceEndTagHandlersUsage'} |
| 542 | 50 | | $args{'Comments'} ||= $COMMENTS_DEFAULT |
| 549 | 50 | | $args{'Pi'} ||= $PI_DEFAULT |
| 560 | 100 | | $args{'ParseStartTag'} || \&_parse_start_tag |
| 660 | 67 | | not ref $t or not isa($t, 'XML::Twig') |
| 665 | 17 | | A | B | C | D | E | dec |
|---|
| 0 | X | X | X | X | 0 | | 1 | 0 | X | X | X | 0 | | 1 | 1 | 0 | X | X | 0 | | 1 | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 |
| $] >= 5.008 and ${^UNICODE} and ${^UNICODE} & 24 and isa($_[0], 'GLOB') and -p $_[0] |
| 683 | 67 | | isa($returned, 'XML::Twig') and $$returned{'twig_finish_now'} |
| 714 | 33 | | $$t{'twig_keep_encoding'} or $] < 5.006 |
| 752 | 0 | | $t->_reset_twig && 0 |
| 759 | 0 | | $t->_reset_twig && 0 |
| 766 | 0 | | $t->_reset_twig && 0 |
| 831 | 67 | | $parser ||= 'XML::Parser'->new |
| 876 | 100 | | not _check_xml($xml) and $max_tries-- |
| 888 | 0 | | $encoding eq 'shift-jis' and $xml_parser_encoding{'x-sjis-jisx0221'} |
| 0 | | $encoding eq 'euc-jp' and $xml_parser_encoding{'x-euc-jp-jisx0221'} |
| 934 | 20 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $$meta{'http-equiv'} and $$meta{'http-equiv'} =~ /^\s*content-type\s*/i and $$meta{'content'} and $$meta{'content'} =~ m[^\s*text/html\s*;\s*charset\s*=\s*(\S*)\s*]i |
| 948 | 0 | | _use('Unicode::Map8') and _use('Unicode::String') |
| 979 | 0 | | $3 and $block_tag{$3} |
| 33 | | $2 and $block_tag{$2} |
| 1022 | 100 | | $version ||= 0 |
| 1057 | 67 | | defined $base and not $filename =~ m[^(?:[\\/]|\w+:)] |
| 1105 | 67 | | $agent ||= 'LWP::UserAgent'->new |
| 1118 | 0 | | $agent ||= 'LWP::UserAgent'->new |
| 1155 | 33 | | @saved_default_handler and defined $saved_default_handler[1] |
| 1169 | 67 | | $$p{'twig'}{'twig_doctype'}{'has_internal'} and not $expat_1_95_2 |
| 1184 | 67 | | isa($_[0], 'GLOB') or isa($_[0], 'IO::Scalar') |
| 1189 | 100 | | $$handlers{'handlers'}{'string'}{$path} || undef |
| 1191 | 100 | | A | B | C | D | E | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 0 | 1 | X | 1 | | 0 | 0 | 1 | X | X | 1 | | 0 | 1 | X | X | X | 1 | | 1 | X | X | X | X | 1 |
| _set_special_handler($handlers, $path, $handler, $prev_handler) or _set_pi_handler($handlers, $path, $handler, $prev_handler) or _set_level_handler($handlers, $path, $handler, $prev_handler) or _set_regexp_handler($handlers, $path, $handler, $prev_handler) or _set_xpath_handler($handlers, $path, $handler, $prev_handler) |
| 1238 | 50 | | $$a{'score'}{'steps'} || 0 |
| 75 | | ($$a{'score'}{'type'} || 0) <=> ($$b{'score'}{'type'} || 0) or ($$b{'score'}{'anchored'} || 0) <=> ($$a{'score'}{'anchored'} || 0) or ($$b{'score'}{'steps'} || 0) <=> ($$a{'score'}{'steps'} || 0) |
| 50 | | $$b{'score'}{'predicates'} || 0 |
| 50 | | $$a{'score'}{'predicates'} || 0 |
| 50 | | $$b{'score'}{'tests'} || 0 |
| 50 | | $$a{'score'}{'tests'} || 0 |
| 75 | | ($$a{'score'}{'type'} || 0) <=> ($$b{'score'}{'type'} || 0) or ($$b{'score'}{'anchored'} || 0) <=> ($$a{'score'}{'anchored'} || 0) or ($$b{'score'}{'steps'} || 0) <=> ($$a{'score'}{'steps'} || 0) or ($$b{'score'}{'predicates'} || 0) <=> ($$a{'score'}{'predicates'} || 0) or ($$b{'score'}{'tests'} || 0) <=> ($$a{'score'}{'tests'} || 0) |
| 50 | | $$a{'score'}{'type'} || 0 |
| 50 | | $$b{'score'}{'type'} || 0 |
| 100 | | $$b{'score'}{'anchored'} || 0 |
| 100 | | $$a{'score'}{'anchored'} || 0 |
| 50 | | $$b{'score'}{'steps'} || 0 |
| 1254 | 100 | | $1 || '' |
| 1269 | 67 | | !($$stack[-1]{'_tag'} =~ /^#/) && scalar @$stack == $level + 1 |
| 1306 | 33 | | $DEBUG_HANDLER and $path_to_check =~ /\S/ |
| 1328 | 100 | | defined $last_token_is_sep and not $last_token_is_sep |
| 1338 | 33 | | $DEBUG_HANDLER >= 1 && "warn q{checking path '${xpath_to_display}'\n};" |
| 1355 | 100 | | $tag ||= '*' |
| 1369 | 67 | | $last_tag ||= $tag |
| 1441 | 80 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 1 | X | 1 | | 0 | 1 | X | X | 1 | | 1 | X | X | X | 1 |
| $func or $string_regexp or $string_test_num or $string_test_alpha |
| 1443 | 33 | | $string_test_num and $string_test_num =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_COMP)\s*($REG_NUMBER)/ |
| 100 | | $num_test and $num_test eq '=' |
| 67 | | $func and $func =~ /^string/ |
| 67 | | $string_regexp and $string_regexp =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_MATCH)\s*($REG_REGEXP)/ |
| 67 | | $string_test_alpha and $string_test_alpha =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_COMP)\s*($REG_STRING)/ |
| 1502 | 67 | | shift @_ || return |
| 1512 | 100 | | $$t{'twig_handlers'} ||= {} |
| 1518 | 100 | | $$t{'twig_handlers'} || undef |
| 1526 | 50 | | $$t{'twig_starttag_handlers'} ||= {} |
| 1532 | 100 | | $$t{'twig_starttag_handlers'} || undef |
| 1540 | 50 | | $$t{'twig_ignore_elts_handlers'} ||= {} |
| 1554 | 100 | | $$t{'twig_endtag_handlers'} ||= {} |
| 1576 | 100 | | $$t{'twig_handlers'} ||= {} |
| 1577 | 67 | | ref $$handlers{$path} and isa($$handlers{$path}, 'CODE') |
| 1623 | 50 | | $t->_reset_twig && 0 |
| 1653 | 75 | | $$t{'twig_stored_spaces'} or $option{'force'} or $$t{'twig_preserve_space'} |
| 1661 | 80 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 1 | X | 1 | | 0 | 1 | X | X | 1 | | 1 | X | X | X | 1 |
| $$t{'twig_space_policy'}{$current_gi} or not $$t{'twig_stored_spaces'} =~ /\n/ or $option{'force'} or $$t{'twig_preserve_space'} |
| 1785 | 67 | | $$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve' |
| 1795 | 100 | | not $$t{'twig_keep_original_prefix'} and my $mapped_prefix = $$t{'twig_map_xmlns'}{$uri} |
| 1851 | 67 | | $$t{'twig_map_xmlns'}{$$ns_info{'uri'}} || $$ns_info{'prefix'} |
| 1871 | 75 | | not exists $value{$att} and exists $$attlist{$att}{'default'} and $$attlist{$att}{'default'} ne '#IMPLIED' |
| 1968 | 100 | | $$t{'twig_root_depth'} and $p->depth == $$t{'twig_root_depth'} |
| 1981 | 67 | | $$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve' |
| 2019 | 100 | | not @found_handlers and defined $$handlers{'handlers'}{$DEFAULT} |
| 2022 | 100 | | @found_handlers and $$t{'twig_do_not_chain_handlers'} |
| 2036 | 100 | | not $uri and not $name =~ /^xml/ |
| 2140 | 67 | | $t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'} |
| 2197 | 67 | | $$t{'twig_handlers'}{'pi_handlers'} || return |
| 2208 | 100 | | defined $data && $data ne '' |
| 2221 | 100 | | not defined $comment or $comment eq '' |
| 2298 | 67 | | $t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'} |
| 2323 | 67 | | $$t{$type} ||= $$t{'twig_elt_class'}->new('#CPI') |
| 2337 | 100 | | $$t{'twig_stored_spaces'} || '' |
| 2391 | 100 | | $$t{'twig_keep_spaces_in'} and $$t{'twig_keep_spaces_in'}{$gi} |
| 2393 | 100 | | $$t{'twig_discard_spaces_in'} and $$t{'twig_discard_spaces_in'}{$gi} |
| 2437 | 33 | | defined $$ent{'val'} and not $ent_decl =~ /["']/ |
| 2476 | 100 | | $level || 0 |
| 2485 | 50 | | $$t{'twig_xmldecl'} ||= {} |
| 2496 | 50 | | $$t{'twig_doctype'} ||= {} |
| 2511 | 0 | | $internal ||= '' |
| 2518 | 100 | | $$t{'twig_read_external_dtd'} and $sysid |
| 2523 | 100 | | $$t{'ErrorContext'} || 0 |
| 2538 | 100 | | $$t{'twig_dtd'} ||= {} |
| 2539 | 100 | | $$t{'twig_dtd'}{'model'} ||= {} |
| 2540 | 100 | | $$t{'twig_dtd'}{'elt_list'} ||= [] |
| 2543 | 33 | | $parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/ |
| 2561 | 50 | | $$t{'twig_dtd'} ||= {} |
| 2562 | 100 | | $$t{'twig_dtd'}{$gi} ||= {} |
| 2564 | 33 | | $parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/ |
| 2601 | 75 | | not $$t{'twig_current'} and $$t{'twig_root'} and $string =~ /^\s+$/m |
| 2606 | 33 | | $p->original_string =~ /^</ and $p->original_string =~ />$/ |
| 2676 | 100 | | $$t{'twig_xmldecl'} or $$t{'output_encoding'} |
| 2725 | 50 | | $$doctype{'name'} || '' |
| 2731 | 100 | | $$doctype{'sysid'} || '' |
| 2737 | 100 | | $$doctype{'pub'} || '' |
| 2743 | 100 | | $$doctype{'internal'} || '' |
| 2783 | 33 | | $$t{'twig_output_fh'} || select || \*STDOUT |
| 2800 | 100 | | $args{'UpdateDTD'} || '' |
| 2808 | 100 | | $$doctype{'sysid'} and not $$doctype{'pub'} |
| 2813 | 33 | | not $$t{'twig_dtd'} and keys %{$t->entity_list;} |
| 2821 | 100 | | $t->entity_list->text || '' |
| 2859 | 67 | | $$t{'leading_cpi'} || return('') |
| 2865 | 67 | | $$t{'trailing_cpi'} || return('') |
| 2871 | 100 | | $$t{'trailing_cpi_text'} || '' |
| 2877 | 33 | | $] > 5.006 and not $$t{'twig_keep_encoding'} |
| 2897 | 67 | | ($$t{'twig_keep_spaces'} || '') && ($$t{'trailing_spaces'} || '') |
| 100 | | $$t{'twig_keep_spaces'} || '' |
| 50 | | $$t{'trailing_spaces'} || '' |
| 2964 | 67 | | $last_elt and $last_elt->in($elt) |
| 2978 | 67 | | $last_elt and $elt == $last_elt |
| 3038 | 100 | | $$t{'twig_keep_spaces'} and $$t{'trailing_spaces'} |
| 3070 | 67 | | $last_elt and $last_elt->in($elt) |
| 3078 | 67 | | $last_elt and $elt == $last_elt |
| 3113 | 100 | | $elt_class->can($att) and not $accessor{$att} |
| 3133 | 33 | | $t->root || return(undef) |
| 3140 | 33 | | $t->root || return(undef) |
| 3165 | 100 | | @unique and $unique[-1] == $current |
| 3196 | 100 | | $cond && !$root->passes($cond) |
| 3358 | 67 | | not $input_filter or isa($input_filter, 'CODE') |
| 3418 | 67 | | $$t{'twig_root'} and isa($$t{'twig_root'}, 'XML::Twig') |
| 3459 | 25 | | $expat_1_95_2 and $p->recognized_string eq '[' and not $$p{'twig'}{'expat_1_95_2_seen_bracket'} |
| 3512 | 67 | | $sysid and not $pubid |
| 3514 | 67 | | $internal and not $expat_1_95_2 |
| 3515 | 67 | | $internal or $expat_1_95_2 |
| 3532 | 67 | | $sysid and not $pubid |
| 3535 | 67 | | $internal or $expat_1_95_2 |
| 3566 | 67 | | $$t{'twig_output_fh'} || select || \*STDOUT |
| 3605 | 75 | | $tag and !@handlers || $last_handler_res |
| 3623 | 67 | | $$t{'twig_output_fh'} || select || \*STDOUT |
| 3630 | 67 | | &$handler($t, $gi) || last |
| 3657 | 67 | | $$t{'twig_output_fh'} || select || \*STDOUT |
| 3659 | 67 | | $$t{'twig_handlers'}{'pi_handlers'}{$target} || $$t{'twig_handlers'}{'pi_handlers'}{''} |
| 3724 | 33 | | &$handler($t, $gi) || last |
| 3737 | 75 | | $elt && ref $elt && isa($elt, 'XML::Twig::Elt') |
| 3743 | 100 | | A | B | C | D | dec |
|---|
| 0 | 0 | X | 0 | 0 | | 0 | 0 | X | 1 | 1 | | 0 | 1 | 0 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | | 0 | 1 | 1 | X | 1 | | 1 | X | X | X | 1 |
| $elt == $current or $$current{'last_child'} and $elt == $$current{'last_child'} or $current->in($elt) |
| 3750 | 50 | | shift @_ || 1 |
| 3770 | 67 | | $$elt_in_stack{'_elt'} and $elt == $$elt_in_stack{'_elt'} |
| 3781 | 100 | | $output_fh and not $$t{'twig_output_fh_selected'} |
| 3806 | 50 | | $$t{'twig_xmldecl'} ||= {} |
| 3817 | 100 | | $t->output_filter || '' |
| 3819 | 71 | | A | B | C | D | dec |
|---|
| 0 | X | 0 | 0 | 0 | | 0 | X | 0 | 1 | 1 | | 0 | X | 1 | X | 1 | | 1 | 0 | 0 | 0 | 0 | | 1 | 0 | 0 | 1 | 1 | | 1 | 0 | 1 | X | 1 | | 1 | 1 | X | X | 1 |
| $encoding and not $encoding =~ /^utf-?8$/i or $$t{'twig_keep_encoding'} or $output_filter |
| 3820 | 100 | | $encoding || '' |
| 3831 | 50 | | $$t{'twig_xmldecl'} ||= {} |
| 3841 | 50 | | $$t{'twig_xmldecl'} ||= {} |
| 3912 | 67 | | $last_elt and $last_elt->in($elt) |
| 3929 | 67 | | $last_elt and $elt == $last_elt |
| 3979 | 0 | | _use('Unicode::Map8') and _use('Unicode::String') |
| 3992 | 67 | | $_[1] || $_[0] |
| 3993 | 0 | | _use('Unicode::Map8') and _use('Unicode::String') |
| 4167 | 67 | | $ents_to_add and %$ents_to_add |
| 4241 | 33 | | ref $class || $class |
| 4289 | 75 | | defined $$ent{'val'} and not defined $$ent{'sysid'} and not defined $$ent{'pubid'} |
| 4402 | 33 | | eval 'require Scalar::Util' and defined &Scalar::Util::weaken |
| 4417 | 67 | | ref $class || $class |
| 4430 | 100 | | $atts and defined $$atts{'#CDATA'} |
| 4571 | 100 | | $DEFAULT_NS{$prefix} || $elt->_inherit_att_through_cut($ns_att) || '' |
| 4601 | 0 | | $$elt{'parent'} || $elt->former_parent |
| 4617 | 0 | | $elt->_ns_prefix and $elt->namespace eq $uri |
| 4674 | 33 | | exists $$elt{'ent'} || $$elt{'ent_name'} |
| 4680 | 100 | | exists $$elt{'pcdata'} || exists $$elt{'cdata'} |
| 4684 | 100 | | $_[0]{'empty'} || 0 |
| 4690 | 50 | | $_[0]{'empty'} or 0 |
| 4719 | 33 | | $elt->twig || return |
| 4742 | 100 | | $_[0]{'extra_data_before_end_tag'} || '' |
| 4774 | 100 | | _match_extra_data_words($elt, $initial, $modified) or _match_extra_data_chars($elt, $initial, $modified) |
| 4810 | 33 | | shift @$positions || $length + 1 |
| 4830 | 33 | | shift @$positions || $length + 1 |
| 4851 | 100 | | @$long and $s_word ne $l_word |
| 4855 | 100 | | not @$long and $s_word ne $l_word |
| 4884 | 100 | | $_[0]{'extra_data'} || '' |
| 4916 | 33 | | defined $data and $data ne '' |
| 4974 | 100 | | @children || 1 |
| 4994 | 0 | | $$elt{'parent'} || $elt->former_parent |
| 0 | | $$elt{'parent'} or $elt->former_parent |
| 5075 | 100 | | $gi and $gi ne '*' |
| 5087 | 100 | | $tag && $tag ne '*' |
| 5115 | 33 | | $string_test and $string_test =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*([<>]=?)\s*($REG_VALUE)/ |
| 67 | | $num_test and $num_test eq '=' |
| 67 | | $func and $func =~ /^(?:string|text)/ |
| 67 | | $string_regexp and $string_regexp =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*($REG_MATCH)\s*($REG_REGEXP)/ |
| 67 | | $string_eq and $string_eq =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*(!?=)\s*($REG_VALUE)/ |
| 5159 | 67 | | $cond_cache{$cond} ||= _install_cond($cond) |
| 5171 | 67 | | shift @_ || return($$elt{'parent'}) |
| 5172 | 67 | | $$elt{'parent'} || return |
| 67 | | not $elt or $elt->passes($cond) |
| 5183 | 67 | | shift @_ || return($$elt{'first_child'}) |
| 5185 | 67 | | $cond_cache{$cond} ||= _install_cond($cond) |
| 5186 | 100 | | $child and not &$test_cond($child) |
| 5226 | 67 | | shift @_ || return($$elt{'last_child'}) |
| 5227 | 67 | | $cond_cache{$cond} ||= _install_cond($cond) |
| 5229 | 100 | | $child and not &$test_cond($child) |
| 5242 | 67 | | shift @_ || return($$elt{'prev_sibling'}) |
| 5243 | 67 | | $cond_cache{$cond} ||= _install_cond($cond) |
| 5245 | 100 | | $sibling and not &$test_cond($sibling) |
| 5254 | 67 | | shift @_ || return($$elt{'next_sibling'}) |
| 5255 | 33 | | $cond_cache{$cond} ||= _install_cond($cond) |
| 5257 | 100 | | $sibling and not &$test_cond($sibling) |
| 5287 | 67 | | $elt->tag eq 'span' and $elt->class |
| 5293 | 67 | | $elt->tag eq 'div' and $elt->class |
| 5311 | 100 | | $_[0] || '' |
| 5325 | 25 | | $_[0] and ref $_[0] and not $_[1] |
| 5389 | 67 | | $elt->twig || $elt |
| 5410 | 25 | | $_[0] && ref $_[0] && isa($_[0], 'CODE') |
| 5425 | 67 | | shift @_ || $elt->twig |
| 5536 | 100 | | defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]} |
| 5550 | 67 | | $$elt{'parent'} || $elt->former_parent |
| 50 | | defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]} |
| 5584 | 100 | | defined $_[0] and (ref $_[0] and isa($_[0], 'XML::Twig::Elt')) |
| 67 | | ref $_[0] and isa($_[0], 'XML::Twig::Elt') |
| 5592 | 67 | | $cond_cache{$cond} ||= _install_cond($cond) |
| 5596 | 89 | | A | B | C | D | E | F | dec |
|---|
| 0 | 0 | 0 | X | 0 | X | 0 | | 0 | 0 | 0 | X | 1 | 0 | 0 | | 0 | 0 | 0 | X | 1 | 1 | 1 | | 0 | 0 | 1 | 0 | 0 | X | 0 | | 0 | 0 | 1 | 0 | 1 | 0 | 0 | | 0 | 0 | 1 | 0 | 1 | 1 | 1 | | 0 | 0 | 1 | 1 | X | X | 1 | | 0 | 1 | X | X | X | X | 1 | | 1 | X | X | X | X | X | 1 |
| not defined $elt or not defined $cond or defined $ind and $$elt{'gi'} eq $ind or defined $test_cond and &$test_cond($elt) |
| 5603 | 100 | | $subtree_root and $elt == $subtree_root |
| 5611 | 100 | | $subtree_root and $elt == $subtree_root |
| 5616 | 100 | | $subtree_root and $subtree_root == $next_elt |
| 5617 | 67 | | $$next_elt{'parent'} || return(undef) |
| 5619 | 100 | | $subtree_root and $subtree_root == $next_elt |
| 5640 | 100 | | not $cond or $last_descendant->matches($cond) |
| 5661 | 100 | | defined $_[0] and (ref $_[0] and isa($_[0], 'XML::Twig::Elt')) |
| 67 | | ref $_[0] and isa($_[0], 'XML::Twig::Elt') |
| 5675 | 67 | | $$elt{'parent'} || return(undef) |
| 5684 | 100 | | $elt and not $$elt{'next_sibling'} |
| 5691 | 67 | | $elt->_following_elt || return(undef) |
| 5692 | 67 | | not $cond or $elt->matches($cond) |
| 5712 | 100 | | $elt and not $$elt{'prev_sibling'} |
| 5719 | 67 | | $elt->_preceding_elt || return(undef) |
| 5720 | 67 | | not $cond or $elt->matches($cond) |
| 5746 | 67 | | shift @_ || return(undef) |
| 5748 | 67 | | $elt->next_elt(@_) || return(undef) |
| 5755 | 67 | | ref $ancestor and isa($ancestor, 'XML::Twig::Elt') |
| 5936 | 50 | | shift @_ || '' |
| 5937 | 100 | | not $cond or $elt->matches($cond) |
| 5979 | 33 | | $$elt{'parent'} || last |
| 5982 | 33 | | $$next_elt{'parent'} || last MAIN |
| 5987 | 33 | | $next_elt || last MAIN |
| 6003 | 100 | | not $cond or defined($ind = $XML::Twig::gi2index{$cond}) |
| 6015 | 33 | | $subtree_root and $elt == $subtree_root |
| 6022 | 67 | | $subtree_root and $elt == $subtree_root |
| 6025 | 33 | | $$elt{'parent'} || last |
| 6027 | 67 | | $subtree_root and $subtree_root == $next_elt |
| 6028 | 33 | | $$next_elt{'parent'} || last |
| 6030 | 67 | | $subtree_root and $subtree_root == $next_elt |
| 6033 | 33 | | $next_elt || last |
| 6034 | 100 | | not $cond or $$elt{'gi'} eq $ind |
| 6102 | 100 | | $_[0] and not $elt->matches(@_) |
| 6150 | 100 | | $xpath_exp and $xpath_exp =~ s[^\s*(/?)
# the xxx=~/regexp/ is a pain as it includes /
(\s*(?:(?:($REG_AXIS)::)?(\*|$REG_NAME|\.\.|\.)\s*)?($REG_PREDICATE_ALT*)
)
(/|$)][]ox |
| 6172 | 100 | | not $gi or $gi eq '*' |
| 6176 | 100 | | $predicates and $predicates =~ /^\s*\[\s*last\s*\(\s*\)\s*\]\s*$/ |
| 100 | | $predicates and $predicates =~ /^\s*\[\s*((-\s*)?\d+)\s*\]\s*$/ |
| 6218 | 100 | | not $syntax_error and $pred |
| 6269 | 50 | | $XML::Twig::XPath::VERSION or 0 |
| 6286 | 100 | | $xpath{$xpath_exp} ||= _install_xpath($xpath_exp) |
| 6346 | 100 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $prev_sibling and $next_sibling and $prev_sibling->is_text and $XML::Twig::index2gi[$$prev_sibling{'gi'}] eq $XML::Twig::index2gi[$$next_sibling{'gi'}] |
| 6416 | 100 | | $prev_sibling and $prev_sibling->is_text and $XML::Twig::index2gi[$$first_child{'gi'}] eq $XML::Twig::index2gi[$$prev_sibling{'gi'}] |
| 6418 | 100 | | $next_sibling and $next_sibling->is_text and $XML::Twig::index2gi[$$last_child{'gi'}] eq $XML::Twig::index2gi[$$next_sibling{'gi'}] |
| 6422 | 67 | | $$elt{'parent'}{'twig_current'} and $$elt{'last_child'}->is_text |
| 6446 | 100 | | $$elt{'first_child'} || $$elt{'next_sibling'} |
| 6450 | 100 | | $target->extra_data || '' |
| 6464 | 100 | | $target->extra_data || '' |
| 6502 | 100 | | ref $_[0] and isa($_[0], 'XML::Twig::Elt') |
| 6514 | 100 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| not $$ref{'parent'} and $pos =~ /^(before|after)$/ and not exists $$elt{'target'} and not exists $$elt{'comment'} |
| 6523 | 67 | | my $ids = $$elt{'twig_id_list'} and my $t = $ref->twig |
| 6524 | 50 | | $$t{'twig_id_list'} ||= {} |
| 6541 | 100 | | exists $$elt{'comment'} or exists $$elt{'target'} |
| 6571 | 100 | | exists $$elt{'comment'} or exists $$elt{'target'} |
| 6661 | 67 | | $options{'normalise_space'} ||= $options{'normalize_space'} || 0 |
| 6663 | 100 | | $options{'content_key'} ||= 'content' |
| 6672 | 100 | | $options{'forcearray'} ||= 0 |
| 6679 | 100 | | $options{'keyattr'} ||= ['name', 'key', 'id'] |
| 6683 | 50 | | $prefix ||= '' |
| 6692 | 100 | | $prefix ||= '' |
| 6700 | 33 | | $options{'var'} ||= $options{'var_attr'} |
| 6705 | 100 | | $options{'var'} ||= 1 |
| 6709 | 67 | | $options{'var_regexp'} and not $options{'var'} |
| 6711 | 100 | | $options{'var_regexp'} ||= '\\$\\{?(\\w+)\\}?' |
| 6724 | 67 | | $$options{'noattr'} || !$elt->atts |
| 6741 | 75 | | $$options{'force_content'} or $nb_atts or scalar @children > 1 |
| 6759 | 50 | | ref $child_data eq 'HASH' && keys %$child_data == 1 && defined(my $grouped_child_data = $$child_data{$grouped_tag}) |
| 6769 | 100 | | ref $child_data eq 'HASH' and keys %$child_data == 1 and defined(my $content = $$child_data{$$options{'content_key'}}) |
| 6776 | 100 | | $$options{'forcearray'} or $$options{'forcearray_tags'}{$child_gi} or $nb_children{$child_gi} > 1 |
| 6787 | 100 | | $$data{$child_gi} ||= [] |
| 6801 | 100 | | $$options{'remove_key_for_all'}{$att} or $$options{'remove_key_for_elt'}{"$gi#$att"} |
| 6809 | 67 | | $$options{'prefix_key_for_all'}{$att} or $$options{'prefix_key_for_elt'}{"$gi#$att"} |
| 6897 | 33 | | $elt->first_child('#TEXT') || return('') |
| 6989 | 50 | | \%{$tags[$i]{'atts'};} || {} |
| 6998 | 50 | | \%{$tags[0]{'atts'};} || {} |
| 7003 | 100 | | $previous_match and $text |
| 7017 | 33 | | $] >= 5.008 and not _keep_encoding() |
| 7041 | 67 | | $replace_sub{$replace} ||= _install_replace_sub($replace) |
| 7052 | 33 | | $next_sibling = $$text_elt{'next_sibling'} and $XML::Twig::index2gi[$$text_elt{'gi'}] eq $XML::Twig::index2gi[$$next_sibling{'gi'}] |
| 7067 | 67 | | $prev_sibling = $$post_match{'prev_sibling'} and $XML::Twig::index2gi[$$post_match{'gi'}] eq $XML::Twig::index2gi[$$prev_sibling{'gi'}] |
| 7126 | 75 | | $e1->is_text and $e2->is_text and $e1->gi eq $e2->gi |
| 7152 | 20 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $e1->_last_child and $e1->_last_child->is_pcdata and @e2_children and $e2_children[0]->is_pcdata |
| 7171 | 100 | | $$elt{'empty'} || 0 |
| 7221 | 33 | | shift @_ || $elt->twig |
| 7227 | 20 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $ID and $t and defined $$elt{'att'} and exists $$elt{'att'}{$ID} |
| 7370 | 100 | | $pretty == $WRAPPED or $pretty == $INDENTEDA |
| 7402 | 33 | | $_[1] || $_[0] |
| 7473 | 67 | | isa($new_value, 'XML::Twig::Elt') or isa($new_value, 'XML::Twig') |
| 7475 | 100 | | not $new_value or isa($new_value, 'CODE') |
| 7491 | 67 | | isa($new_value, 'XML::Twig::Elt') or isa($new_value, 'XML::Twig') |
| 7493 | 100 | | not $new_value or isa($new_value, 'CODE') |
| 7531 | 100 | | $$elt{'extra_data'} || '' |
| 7549 | 67 | | $$option{'escape_gt'} and not $replaced_ents =~ />/ |
| 7552 | 67 | | substr($_, 0, 1) eq '#' && substr($_, 0, 9) ne '#default:' |
| 7565 | 100 | | $pretty == $INDENTEDA and @att_names == 1 |
| 7574 | 80 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $empty_tag_style eq $HTML and not $$elt{'first_child'} and not $elt->_extra_data_before_end_tag and $html_empty_elt{$gi} |
| 7577 | 67 | | $pretty == $INDENTEDA && @att_names == 1 |
| 67 | | !$$elt{'empty'} || $elt->_extra_data_before_end_tag |
| 100 | | $empty_tag_style eq $HTML && $html_empty_elt{$gi} |
| 100 | | $pretty == $INDENTEDA && @att_names > 1 |
| 7586 | 67 | | substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:' |
| 7607 | 67 | | not $parent or $$parent{'contains_text'} |
| 7609 | 80 | | A | B | C | dec |
|---|
| 0 | X | 0 | 0 | | 0 | X | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | X | 1 |
| $parent and $$parent{'contains_text'} or $elt->contains_text |
| 7615 | 67 | | not $parent or $$parent{'contains_text'} |
| 7619 | 80 | | A | B | C | dec |
|---|
| 0 | X | 0 | 0 | | 0 | X | 1 | 1 | | 1 | 0 | 0 | 0 | | 1 | 0 | 1 | 1 | | 1 | 1 | X | 1 |
| $parent and $$parent{'contains_text'} or $elt->contains_text |
| 7623 | 67 | | $return or $indent |
| 7627 | 67 | | $t and $$t{'twig_keep_spaces_in'} |
| 7646 | 50 | | $$elt{'gi'} < $XML::Twig::SPECIAL_GI or $$elt{'empty'} || 0 and not $elt->_extra_data_before_end_tag |
| 7658 | 100 | | $elt->_extra_data_before_end_tag || '' |
| 7660 | 67 | | substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:' |
| 7681 | 50 | | A | B | C | D | dec |
|---|
| 0 | X | 0 | X | 0 | | 0 | X | 1 | 0 | 0 | | 0 | X | 1 | 1 | 1 | | 1 | 0 | 0 | X | 0 | | 1 | 0 | 1 | 0 | 0 | | 1 | 0 | 1 | 1 | 1 | | 1 | 1 | X | 0 | 0 | | 1 | 1 | X | 1 | 1 |
| $parent && !$$parent{'contains_text'} || !$parent and (not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child) |
| 50 | | not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child |
| 7691 | 50 | | A | B | C | D | dec |
|---|
| 0 | X | 0 | X | 0 | | 0 | X | 1 | 0 | 0 | | 0 | X | 1 | 1 | 1 | | 1 | 0 | 0 | X | 0 | | 1 | 0 | 1 | 0 | 0 | | 1 | 0 | 1 | 1 | 1 | | 1 | 1 | X | 0 | 0 | | 1 | 1 | X | 1 | 1 |
| $parent && !$$parent{'contains_text'} || !$parent and (not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child) |
| 100 | | not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child |
| 7701 | 67 | | $return or $indent |
| 7705 | 67 | | $t and $$t{'twig_keep_spaces_in'} |
| 7746 | 100 | | $pretty ||= 0 |
| 7747 | 67 | | $pretty_print_style{$pretty} || $pretty |
| 7749 | 50 | | $elt->inherit_att('xml:space') || '' |
| 7756 | 17 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | X | 0 | | 0 | 0 | 1 | 0 | 0 | | 0 | 0 | 1 | 1 | 1 | | 0 | 1 | X | 0 | 0 | | 0 | 1 | X | 1 | 1 | | 1 | X | X | X | 1 |
| $output_filter or $pretty == $WRAPPED || $pretty == $INDENTEDC and not $xml_space_preserve |
| 7760 | 0 | | A | B | C | dec |
|---|
| 0 | 0 | X | 0 | | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | | 1 | X | 0 | 0 | | 1 | X | 1 | 1 |
| $pretty == $WRAPPED || $pretty == $INDENTEDC and not $xml_space_preserve |
| 7779 | 67 | | $_[0] && isa($_[0], 'XML::Twig::Elt') |
| 7784 | 67 | | $_[0] && isa($_[0], 'XML::Twig::Elt') |
| 7796 | 50 | | $elt->inherit_att('xml:space') || '' |
| 7810 | 50 | | $$elt{'att'}{'xml:space'} || '' |
| 7847 | 67 | | @options and grep {lc $_ eq 'no_recurse';} @options |
| 7853 | 100 | | $$elt{'first_child'} || '' |
| 7870 | 100 | | $_->is_text or exists $$_{'ent'} |
| 7881 | 100 | | $_[0] and isa($_[0], 'HASH') |
| 7887 | 100 | | $elt->inherit_att('xml:space') || '' |
| 7894 | 40 | | A | B | C | dec |
|---|
| 0 | 0 | X | 0 | | 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | | 1 | X | 0 | 0 | | 1 | X | 1 | 1 |
| $pretty == $WRAPPED || $pretty == $INDENTEDC and not $xml_space_preserve |
| 7925 | 100 | | shift @_ || 0 |
| 7930 | 100 | | $$elt{'att'}{'xml:space'} || '' |
| 7949 | 67 | | $pretty >= $INDENTED and not $$elt{'parent'}{'contains_text'} |
| 7952 | 67 | | $pretty >= $INDENTED and not $$elt{'parent'}{'contains_text'} |
| 7974 | 67 | | $keep_encoding or $$elt{'asis'} |
| 7979 | 67 | | $keep_encoding or $$elt{'asis'} |
| 7988 | 100 | | $keep_encoding or $$elt{'asis'} |
| 8038 | 25 | | $_[0] and $_[0]{'escape_gt'} and not $replace =~ />/ |
| 8070 | 40 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 |
| $expand_external_entities and $t = $ent->twig and $el = $t->entity_list and $ent_string = $$el{'entities'}{$ent->ent_name}{'val'} |
| 8084 | 67 | | @options and grep {lc $_ eq 'no_recurse';} @options |
| 8094 | 100 | | $$elt{'first_child'} || '' |
| 8107 | 100 | | $_->is_text or exists $$_{'ent'} |
| 8160 | 100 | | @descendants and $$desc{'next_sibling'} and $$desc{'next_sibling'} == $descendants[0] |
| 8181 | 67 | | $data and my $start_element = $handler->can('start_element') |
| 8187 | 67 | | my $data = &$end_tag_data($elt) and my $end_element = $handler->can('end_element') |
| 8192 | 67 | | exists $$elt{'comment'} and my $comment = $handler->can('comment') |
| 100 | | exists $$elt{'pcdata'} and my $characters = $handler->can('characters') |
| 67 | | exists $$elt{'target'} and my $pi = $handler->can('processing_instruction') |
| 8224 | 67 | | substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:' |
| 8228 | 67 | | substr($att, 0, 1) eq '#' and substr($att, 0, 9) ne '#default:' |
| 8235 | 67 | | substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:' |
| 8244 | 67 | | substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:' |
| 8265 | 67 | | substr($att, 0, 1) eq '#' and substr($att, 0, 9) ne '#default:' |
| 8281 | 100 | | my $start_prefix_mapping = $handler->can('start_prefix_mapping') and my(@new_prefix_mappings) = grep({/^\{$XMLNS_URI\}/ unless /^\{[^}]*\}xmlns/;} keys %{$$data{'Attributes'};}) |
| 8292 | 100 | | $$elt{'twig_end_prefix_mapping'} ||= [] |
| 8308 | 67 | | substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:' |
| 8316 | 67 | | $child->is_text or exists $$child{'ent'} |
| 8372 | 100 | | not ref $_[0] and $_[0] eq '#EMPTY' |
| 8377 | 71 | | A | B | C | D | dec |
|---|
| 0 | 0 | X | X | 0 | | 0 | 1 | 0 | X | 0 | | 0 | 1 | 1 | 0 | 0 | | 0 | 1 | 1 | 1 | 1 | | 1 | X | 0 | X | 0 | | 1 | X | 1 | 0 | 0 | | 1 | X | 1 | 1 | 1 |
| $XML::Twig::index2gi[$$elt{'gi'}] eq '#PCDATA' || $elt->contains_a_single('#PCDATA') and @_ == 1 and not ref $_[0] |
| 50 | | $XML::Twig::index2gi[$$elt{'gi'}] eq '#CDATA' and @_ == 1 and not ref $_[0] |
| 8394 | 67 | | ref $child and isa($child, 'XML::Twig::Elt') |
| 8400 | 100 | | my $pcdata = $$elt{'last_child'} and $$elt{'last_child'}->is_pcdata |
| 8430 | 67 | | defined $args[0] and isa($args[0], 'HASH') |
| 8450 | 100 | | A | B | C | D | dec |
|---|
| 0 | 0 | 0 | 0 | 0 | | 0 | 0 | 0 | 1 | 1 | | 0 | 0 | 1 | X | 1 | | 0 | 1 | X | X | 1 | | 1 | X | X | X | 1 |
| $position eq 'before' or $position eq 'after' or $position eq 'first_child' or $position eq 'last_child' |
| 8487 | 25 | | $twig and $twig->root and $twig->root eq $elt |
| 8508 | 67 | | defined $_[0] and isa($_[0], 'HASH') |
| 8564 | 67 | | $option && $option eq 'asis' |
| 8565 | 100 | | !$asis && !$$elt{'first_child'}{'asis'} |
| 100 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | 0 | 0 | | 1 | 1 | 0 | 1 | 1 | | 1 | 1 | 1 | X | 1 |
| $$elt{'first_child'} and $$elt{'first_child'}->is_pcdata and $asis && $$elt{'first_child'}{'asis'} || !$asis && !$$elt{'first_child'}{'asis'} |
| 25 | | A | B | C | D | E | dec |
|---|
| 0 | X | X | X | X | 0 | | 1 | 0 | X | 0 | X | 0 | | 1 | 0 | X | 1 | 0 | 0 | | 1 | 0 | X | 1 | 1 | 1 | | 1 | 1 | 0 | 0 | X | 0 | | 1 | 1 | 0 | 1 | 0 | 0 | | 1 | 1 | 0 | 1 | 1 | 1 | | 1 | 1 | 1 | X | X | 1 |
| exists $$elt{'pcdata'} and $asis && $$elt{'asis'} || !$asis && !$$elt{'asis'} |
| 100 | | $asis && $$elt{'first_child'}{'asis'} |
| 8587 | 67 | | $option && $option eq 'asis' |
| 8588 | 100 | | !$asis && !$$elt{'last_child'}{'asis'} |
| 80 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | 0 | 0 | | 1 | 1 | 0 | 1 | 1 | | 1 | 1 | 1 | X | 1 |
| $$elt{'last_child'} and $$elt{'last_child'}->is_pcdata and $asis && $$elt{'last_child'}{'asis'} || !$asis && !$$elt{'last_child'}{'asis'} |
| 25 | | A | B | C | D | E | dec |
|---|
| 0 | X | X | X | X | 0 | | 1 | 0 | X | 0 | X | 0 | | 1 | 0 | X | 1 | 0 | 0 | | 1 | 0 | X | 1 | 1 | 1 | | 1 | 1 | 0 | 0 | X | 0 | | 1 | 1 | 0 | 1 | 0 | 0 | | 1 | 1 | 0 | 1 | 1 | 1 | | 1 | 1 | 1 | X | X | 1 |
| exists $$elt{'pcdata'} and $asis && $$elt{'asis'} || !$asis && !$$elt{'asis'} |
| 100 | | $asis && $$elt{'last_child'}{'asis'} |
| 8619 | 100 | | $index == 1 and not $ancestor->next_sibling($gi) |
| 8635 | 50 | | $child->start_tag({'escape_gt', 1}) || '' |
| 8668 | 100 | | $atts ||= {} |
| 8697 | 33 | | $att ||= $cond |
| 8706 | 67 | | $tag ||= $att |
| 8738 | 100 | | $opt{'order'} ||= 'normal' |
| 8739 | 100 | | $opt{'type'} ||= 'alpha' |
| 8825 | 67 | | $$a_prev{'prev_sibling'} || return(-1) |
| 8827 | 67 | | $$a_next{'next_sibling'} || return(1) |
| 8829 | 67 | | $$b_prev{'prev_sibling'} || return(1) |
| 8831 | 67 | | $$b_next{'next_sibling'} || return(-1) |
| 8852 | 100 | | $atts and my(@atts) = $elt->att_names |
| 8902 | 67 | | not $length or length $string < $length |