Condition Coverage

File:blib/lib/XML/Twig.pm
Coverage:70.6%

line%coveragecondition
13033
ABdec
0X0
100
111
eval 'require Scalar::Util' and defined \&Scalar::Util::weaken
436100
Adec
00
11
$args{'EltClass'} || 'XML::Twig::Elt'
46720
ABCDdec
0XXX0
10XX0
110X0
11100
11111
not $args{'NoLWP'} and not _use('URI') and not _use('URI::File') and not _use('LWP')
490100
ABdec
000
011
1X1
$$self{'twig_roots'} or $args{'ForceEndTagHandlersUsage'}
54250
Adec
00
11
$args{'Comments'} ||= $COMMENTS_DEFAULT
54950
Adec
00
11
$args{'Pi'} ||= $PI_DEFAULT
560100
Adec
00
11
$args{'ParseStartTag'} || \&_parse_start_tag
66067
ABdec
000
011
1X1
not ref $t or not isa($t, 'XML::Twig')
66517
ABCDEdec
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
$] >= 5.008 and ${^UNICODE} and ${^UNICODE} & 24 and isa($_[0], 'GLOB') and -p $_[0]
68367
ABdec
0X0
100
111
isa($returned, 'XML::Twig') and $$returned{'twig_finish_now'}
71433
ABdec
000
011
1X1
$$t{'twig_keep_encoding'} or $] < 5.006
7520
Adec
00
11
$t->_reset_twig && 0
7590
Adec
00
11
$t->_reset_twig && 0
7660
Adec
00
11
$t->_reset_twig && 0
83167
ABdec
000
011
1X1
$parser ||= 'XML::Parser'->new
876100
ABdec
0X0
100
111
not _check_xml($xml) and $max_tries--
8880
ABdec
0X0
100
111
$encoding eq 'shift-jis' and $xml_parser_encoding{'x-sjis-jisx0221'}
0
ABdec
0X0
100
111
$encoding eq 'euc-jp' and $xml_parser_encoding{'x-euc-jp-jisx0221'}
93420
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$$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
9480
ABdec
0X0
100
111
_use('Unicode::Map8') and _use('Unicode::String')
9790
ABdec
0X0
100
111
$3 and $block_tag{$3}
33
ABdec
0X0
100
111
$2 and $block_tag{$2}
1022100
Adec
00
11
$version ||= 0
105767
ABdec
0X0
100
111
defined $base and not $filename =~ m[^(?:[\\/]|\w+:)]
110567
ABdec
000
011
1X1
$agent ||= 'LWP::UserAgent'->new
11180
ABdec
000
011
1X1
$agent ||= 'LWP::UserAgent'->new
115533
ABdec
0X0
100
111
@saved_default_handler and defined $saved_default_handler[1]
116967
ABdec
0X0
100
111
$$p{'twig'}{'twig_doctype'}{'has_internal'} and not $expat_1_95_2
118467
ABdec
000
011
1X1
isa($_[0], 'GLOB') or isa($_[0], 'IO::Scalar')
1189100
Adec
00
11
$$handlers{'handlers'}{'string'}{$path} || undef
1191100
ABCDEdec
000000
000011
0001X1
001XX1
01XXX1
1XXXX1
_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)
123850
Adec
00
11
$$a{'score'}{'steps'} || 0
75
ABCdec
0000
0011
01X1
1XX1
($$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
Adec
00
11
$$b{'score'}{'predicates'} || 0
50
Adec
00
11
$$a{'score'}{'predicates'} || 0
50
Adec
00
11
$$b{'score'}{'tests'} || 0
50
Adec
00
11
$$a{'score'}{'tests'} || 0
75
ABCdec
0000
0011
01X1
1XX1
($$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
Adec
00
11
$$a{'score'}{'type'} || 0
50
Adec
00
11
$$b{'score'}{'type'} || 0
100
Adec
00
11
$$b{'score'}{'anchored'} || 0
100
Adec
00
11
$$a{'score'}{'anchored'} || 0
50
Adec
00
11
$$b{'score'}{'steps'} || 0
1254100
Adec
00
11
$1 || ''
126967
ABdec
0X0
100
111
!($$stack[-1]{'_tag'} =~ /^#/) && scalar @$stack == $level + 1
130633
ABdec
0X0
100
111
$DEBUG_HANDLER and $path_to_check =~ /\S/
1328100
ABdec
0X0
100
111
defined $last_token_is_sep and not $last_token_is_sep
133833
ABdec
0X0
100
111
$DEBUG_HANDLER >= 1 && "warn q{checking path '${xpath_to_display}'\n};"
1355100
Adec
00
11
$tag ||= '*'
136967
ABdec
000
011
1X1
$last_tag ||= $tag
144180
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$func or $string_regexp or $string_test_num or $string_test_alpha
144333
ABdec
0X0
100
111
$string_test_num and $string_test_num =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_COMP)\s*($REG_NUMBER)/
100
ABdec
0X0
100
111
$num_test and $num_test eq '='
67
ABdec
0X0
100
111
$func and $func =~ /^string/
67
ABdec
0X0
100
111
$string_regexp and $string_regexp =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_MATCH)\s*($REG_REGEXP)/
67
ABdec
0X0
100
111
$string_test_alpha and $string_test_alpha =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_COMP)\s*($REG_STRING)/
150267
ABdec
000
011
1X1
shift @_ || return
1512100
Adec
00
11
$$t{'twig_handlers'} ||= {}
1518100
Adec
00
11
$$t{'twig_handlers'} || undef
152650
Adec
00
11
$$t{'twig_starttag_handlers'} ||= {}
1532100
Adec
00
11
$$t{'twig_starttag_handlers'} || undef
154050
Adec
00
11
$$t{'twig_ignore_elts_handlers'} ||= {}
1554100
Adec
00
11
$$t{'twig_endtag_handlers'} ||= {}
1576100
Adec
00
11
$$t{'twig_handlers'} ||= {}
157767
ABdec
0X0
100
111
ref $$handlers{$path} and isa($$handlers{$path}, 'CODE')
162350
Adec
00
11
$t->_reset_twig && 0
165375
ABCdec
0000
0011
01X1
1XX1
$$t{'twig_stored_spaces'} or $option{'force'} or $$t{'twig_preserve_space'}
166180
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$$t{'twig_space_policy'}{$current_gi} or not $$t{'twig_stored_spaces'} =~ /\n/ or $option{'force'} or $$t{'twig_preserve_space'}
178567
ABdec
0X0
100
111
$$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve'
1795100
ABdec
0X0
100
111
not $$t{'twig_keep_original_prefix'} and my $mapped_prefix = $$t{'twig_map_xmlns'}{$uri}
185167
ABdec
000
011
1X1
$$t{'twig_map_xmlns'}{$$ns_info{'uri'}} || $$ns_info{'prefix'}
187175
ABCdec
0XX0
10X0
1100
1111
not exists $value{$att} and exists $$attlist{$att}{'default'} and $$attlist{$att}{'default'} ne '#IMPLIED'
1968100
ABdec
0X0
100
111
$$t{'twig_root_depth'} and $p->depth == $$t{'twig_root_depth'}
198167
ABdec
0X0
100
111
$$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve'
2019100
ABdec
0X0
100
111
not @found_handlers and defined $$handlers{'handlers'}{$DEFAULT}
2022100
ABdec
0X0
100
111
@found_handlers and $$t{'twig_do_not_chain_handlers'}
2036100
ABdec
0X0
100
111
not $uri and not $name =~ /^xml/
214067
ABdec
0X0
100
111
$t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'}
219767
ABdec
000
011
1X1
$$t{'twig_handlers'}{'pi_handlers'} || return
2208100
ABdec
0X0
100
111
defined $data && $data ne ''
2221100
ABdec
000
011
1X1
not defined $comment or $comment eq ''
229867
ABdec
0X0
100
111
$t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'}
232367
ABdec
000
011
1X1
$$t{$type} ||= $$t{'twig_elt_class'}->new('#CPI')
2337100
Adec
00
11
$$t{'twig_stored_spaces'} || ''
2391100
ABdec
0X0
100
111
$$t{'twig_keep_spaces_in'} and $$t{'twig_keep_spaces_in'}{$gi}
2393100
ABdec
0X0
100
111
$$t{'twig_discard_spaces_in'} and $$t{'twig_discard_spaces_in'}{$gi}
243733
ABdec
0X0
100
111
defined $$ent{'val'} and not $ent_decl =~ /["']/
2476100
Adec
00
11
$level || 0
248550
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
249650
Adec
00
11
$$t{'twig_doctype'} ||= {}
25110
Adec
00
11
$internal ||= ''
2518100
ABdec
0X0
100
111
$$t{'twig_read_external_dtd'} and $sysid
2523100
Adec
00
11
$$t{'ErrorContext'} || 0
2538100
Adec
00
11
$$t{'twig_dtd'} ||= {}
2539100
Adec
00
11
$$t{'twig_dtd'}{'model'} ||= {}
2540100
Adec
00
11
$$t{'twig_dtd'}{'elt_list'} ||= []
254333
ABdec
0X0
100
111
$parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/
256150
Adec
00
11
$$t{'twig_dtd'} ||= {}
2562100
Adec
00
11
$$t{'twig_dtd'}{$gi} ||= {}
256433
ABdec
0X0
100
111
$parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/
260175
ABCdec
0XX0
10X0
1100
1111
not $$t{'twig_current'} and $$t{'twig_root'} and $string =~ /^\s+$/m
260633
ABdec
0X0
100
111
$p->original_string =~ /^</ and $p->original_string =~ />$/
2676100
ABdec
000
011
1X1
$$t{'twig_xmldecl'} or $$t{'output_encoding'}
272550
Adec
00
11
$$doctype{'name'} || ''
2731100
Adec
00
11
$$doctype{'sysid'} || ''
2737100
Adec
00
11
$$doctype{'pub'} || ''
2743100
Adec
00
11
$$doctype{'internal'} || ''
278333
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
2800100
Adec
00
11
$args{'UpdateDTD'} || ''
2808100
ABdec
0X0
100
111
$$doctype{'sysid'} and not $$doctype{'pub'}
281333
ABdec
0X0
100
111
not $$t{'twig_dtd'} and keys %{$t->entity_list;}
2821100
Adec
00
11
$t->entity_list->text || ''
285967
ABdec
000
011
1X1
$$t{'leading_cpi'} || return('')
286567
ABdec
000
011
1X1
$$t{'trailing_cpi'} || return('')
2871100
Adec
00
11
$$t{'trailing_cpi_text'} || ''
287733
ABdec
0X0
100
111
$] > 5.006 and not $$t{'twig_keep_encoding'}
289767
ABdec
0X0
100
111
($$t{'twig_keep_spaces'} || '') && ($$t{'trailing_spaces'} || '')
100
Adec
00
11
$$t{'twig_keep_spaces'} || ''
50
Adec
00
11
$$t{'trailing_spaces'} || ''
296467
ABdec
0X0
100
111
$last_elt and $last_elt->in($elt)
297867
ABdec
0X0
100
111
$last_elt and $elt == $last_elt
3038100
ABdec
0X0
100
111
$$t{'twig_keep_spaces'} and $$t{'trailing_spaces'}
307067
ABdec
0X0
100
111
$last_elt and $last_elt->in($elt)
307867
ABdec
0X0
100
111
$last_elt and $elt == $last_elt
3113100
ABdec
0X0
100
111
$elt_class->can($att) and not $accessor{$att}
313333
ABdec
000
011
1X1
$t->root || return(undef)
314033
ABdec
000
011
1X1
$t->root || return(undef)
3165100
ABdec
0X0
100
111
@unique and $unique[-1] == $current
3196100
ABdec
0X0
100
111
$cond && !$root->passes($cond)
335867
ABdec
000
011
1X1
not $input_filter or isa($input_filter, 'CODE')
341867
ABdec
0X0
100
111
$$t{'twig_root'} and isa($$t{'twig_root'}, 'XML::Twig')
345925
ABCdec
0XX0
10X0
1100
1111
$expat_1_95_2 and $p->recognized_string eq '[' and not $$p{'twig'}{'expat_1_95_2_seen_bracket'}
351267
ABdec
0X0
100
111
$sysid and not $pubid
351467
ABdec
0X0
100
111
$internal and not $expat_1_95_2
351567
ABdec
000
011
1X1
$internal or $expat_1_95_2
353267
ABdec
0X0
100
111
$sysid and not $pubid
353567
ABdec
000
011
1X1
$internal or $expat_1_95_2
356667
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
360575
ABCdec
0XX0
1000
1011
11X1
$tag and !@handlers || $last_handler_res
362367
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
363067
ABdec
000
011
1X1
&$handler($t, $gi) || last
365767
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
365967
ABdec
000
011
1X1
$$t{'twig_handlers'}{'pi_handlers'}{$target} || $$t{'twig_handlers'}{'pi_handlers'}{''}
372433
ABdec
000
011
1X1
&$handler($t, $gi) || last
373775
ABCdec
0XX0
10X0
1100
1111
$elt && ref $elt && isa($elt, 'XML::Twig::Elt')
3743100
ABCDdec
00X00
00X11
01000
01011
011X1
1XXX1
$elt == $current or $$current{'last_child'} and $elt == $$current{'last_child'} or $current->in($elt)
375050
Adec
00
11
shift @_ || 1
377067
ABdec
0X0
100
111
$$elt_in_stack{'_elt'} and $elt == $$elt_in_stack{'_elt'}
3781100
ABdec
0X0
100
111
$output_fh and not $$t{'twig_output_fh_selected'}
380650
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
3817100
Adec
00
11
$t->output_filter || ''
381971
ABCDdec
0X000
0X011
0X1X1
10000
10011
101X1
11XX1
$encoding and not $encoding =~ /^utf-?8$/i or $$t{'twig_keep_encoding'} or $output_filter
3820100
Adec
00
11
$encoding || ''
383150
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
384150
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
391267
ABdec
0X0
100
111
$last_elt and $last_elt->in($elt)
392967
ABdec
0X0
100
111
$last_elt and $elt == $last_elt
39790
ABdec
0X0
100
111
_use('Unicode::Map8') and _use('Unicode::String')
399267
ABdec
000
011
1X1
$_[1] || $_[0]
39930
ABdec
0X0
100
111
_use('Unicode::Map8') and _use('Unicode::String')
416767
ABdec
0X0
100
111
$ents_to_add and %$ents_to_add
424133
ABdec
000
011
1X1
ref $class || $class
428975
ABCdec
0XX0
10X0
1100
1111
defined $$ent{'val'} and not defined $$ent{'sysid'} and not defined $$ent{'pubid'}
440233
ABdec
0X0
100
111
eval 'require Scalar::Util' and defined &Scalar::Util::weaken
441767
ABdec
000
011
1X1
ref $class || $class
4430100
ABdec
0X0
100
111
$atts and defined $$atts{'#CDATA'}
4571100
ABdec
000
011
1X1
$DEFAULT_NS{$prefix} || $elt->_inherit_att_through_cut($ns_att) || ''
46010
ABdec
000
011
1X1
$$elt{'parent'} || $elt->former_parent
46170
ABdec
0X0
100
111
$elt->_ns_prefix and $elt->namespace eq $uri
467433
ABdec
000
011
1X1
exists $$elt{'ent'} || $$elt{'ent_name'}
4680100
ABdec
000
011
1X1
exists $$elt{'pcdata'} || exists $$elt{'cdata'}
4684100
Adec
00
11
$_[0]{'empty'} || 0
469050
Adec
00
11
$_[0]{'empty'} or 0
471933
ABdec
000
011
1X1
$elt->twig || return
4742100
Adec
00
11
$_[0]{'extra_data_before_end_tag'} || ''
4774100
ABdec
000
011
1X1
_match_extra_data_words($elt, $initial, $modified) or _match_extra_data_chars($elt, $initial, $modified)
481033
ABdec
000
011
1X1
shift @$positions || $length + 1
483033
ABdec
000
011
1X1
shift @$positions || $length + 1
4851100
ABdec
0X0
100
111
@$long and $s_word ne $l_word
4855100
ABdec
0X0
100
111
not @$long and $s_word ne $l_word
4884100
Adec
00
11
$_[0]{'extra_data'} || ''
491633
ABdec
0X0
100
111
defined $data and $data ne ''
4974100
Adec
00
11
@children || 1
49940
ABdec
000
011
1X1
$$elt{'parent'} || $elt->former_parent
0
ABdec
000
011
1X1
$$elt{'parent'} or $elt->former_parent
5075100
ABdec
0X0
100
111
$gi and $gi ne '*'
5087100
ABdec
0X0
100
111
$tag && $tag ne '*'
511533
ABdec
0X0
100
111
$string_test and $string_test =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*([<>]=?)\s*($REG_VALUE)/
67
ABdec
0X0
100
111
$num_test and $num_test eq '='
67
ABdec
0X0
100
111
$func and $func =~ /^(?:string|text)/
67
ABdec
0X0
100
111
$string_regexp and $string_regexp =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*($REG_MATCH)\s*($REG_REGEXP)/
67
ABdec
0X0
100
111
$string_eq and $string_eq =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*(!?=)\s*($REG_VALUE)/
515967
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
517167
ABdec
000
011
1X1
shift @_ || return($$elt{'parent'})
517267
ABdec
000
011
1X1
$$elt{'parent'} || return
67
ABdec
000
011
1X1
not $elt or $elt->passes($cond)
518367
ABdec
000
011
1X1
shift @_ || return($$elt{'first_child'})
518567
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5186100
ABdec
0X0
100
111
$child and not &$test_cond($child)
522667
ABdec
000
011
1X1
shift @_ || return($$elt{'last_child'})
522767
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5229100
ABdec
0X0
100
111
$child and not &$test_cond($child)
524267
ABdec
000
011
1X1
shift @_ || return($$elt{'prev_sibling'})
524367
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5245100
ABdec
0X0
100
111
$sibling and not &$test_cond($sibling)
525467
ABdec
000
011
1X1
shift @_ || return($$elt{'next_sibling'})
525533
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5257100
ABdec
0X0
100
111
$sibling and not &$test_cond($sibling)
528767
ABdec
0X0
100
111
$elt->tag eq 'span' and $elt->class
529367
ABdec
0X0
100
111
$elt->tag eq 'div' and $elt->class
5311100
Adec
00
11
$_[0] || ''
532525
ABCdec
0XX0
10X0
1100
1111
$_[0] and ref $_[0] and not $_[1]
538967
ABdec
000
011
1X1
$elt->twig || $elt
541025
ABCdec
0XX0
10X0
1100
1111
$_[0] && ref $_[0] && isa($_[0], 'CODE')
542567
ABdec
000
011
1X1
shift @_ || $elt->twig
5536100
ABCdec
0XX0
1000
1011
11X1
defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]}
555067
ABdec
000
011
1X1
$$elt{'parent'} || $elt->former_parent
50
ABCdec
0XX0
1000
1011
11X1
defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]}
5584100
ABdec
0X0
100
111
defined $_[0] and (ref $_[0] and isa($_[0], 'XML::Twig::Elt'))
67
ABdec
0X0
100
111
ref $_[0] and isa($_[0], 'XML::Twig::Elt')
559267
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
559689
ABCDEFdec
000X0X0
000X100
000X111
00100X0
0010100
0010111
0011XX1
01XXXX1
1XXXXX1
not defined $elt or not defined $cond or defined $ind and $$elt{'gi'} eq $ind or defined $test_cond and &$test_cond($elt)
5603100
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
5611100
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
5616100
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
561767
ABdec
000
011
1X1
$$next_elt{'parent'} || return(undef)
5619100
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
5640100
ABdec
000
011
1X1
not $cond or $last_descendant->matches($cond)
5661100
ABdec
0X0
100
111
defined $_[0] and (ref $_[0] and isa($_[0], 'XML::Twig::Elt'))
67
ABdec
0X0
100
111
ref $_[0] and isa($_[0], 'XML::Twig::Elt')
567567
ABdec
000
011
1X1
$$elt{'parent'} || return(undef)
5684100
ABdec
0X0
100
111
$elt and not $$elt{'next_sibling'}
569167
ABdec
000
011
1X1
$elt->_following_elt || return(undef)
569267
ABdec
000
011
1X1
not $cond or $elt->matches($cond)
5712100
ABdec
0X0
100
111
$elt and not $$elt{'prev_sibling'}
571967
ABdec
000
011
1X1
$elt->_preceding_elt || return(undef)
572067
ABdec
000
011
1X1
not $cond or $elt->matches($cond)
574667
ABdec
000
011
1X1
shift @_ || return(undef)
574867
ABdec
000
011
1X1
$elt->next_elt(@_) || return(undef)
575567
ABdec
0X0
100
111
ref $ancestor and isa($ancestor, 'XML::Twig::Elt')
593650
Adec
00
11
shift @_ || ''
5937100
ABdec
000
011
1X1
not $cond or $elt->matches($cond)
597933
ABdec
000
011
1X1
$$elt{'parent'} || last
598233
ABdec
000
011
1X1
$$next_elt{'parent'} || last MAIN
598733
ABdec
000
011
1X1
$next_elt || last MAIN
6003100
ABdec
000
011
1X1
not $cond or defined($ind = $XML::Twig::gi2index{$cond})
601533
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
602267
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
602533
ABdec
000
011
1X1
$$elt{'parent'} || last
602767
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
602833
ABdec
000
011
1X1
$$next_elt{'parent'} || last
603067
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
603333
ABdec
000
011
1X1
$next_elt || last
6034100
ABdec
000
011
1X1
not $cond or $$elt{'gi'} eq $ind
6102100
ABdec
0X0
100
111
$_[0] and not $elt->matches(@_)
6150100
ABdec
0X0
100
111
$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
6172100
ABdec
000
011
1X1
not $gi or $gi eq '*'
6176100
ABdec
0X0
100
111
$predicates and $predicates =~ /^\s*\[\s*last\s*\(\s*\)\s*\]\s*$/
100
ABdec
0X0
100
111
$predicates and $predicates =~ /^\s*\[\s*((-\s*)?\d+)\s*\]\s*$/
6218100
ABdec
0X0
100
111
not $syntax_error and $pred
626950
Adec
00
11
$XML::Twig::XPath::VERSION or 0
6286100
ABdec
000
011
1X1
$xpath{$xpath_exp} ||= _install_xpath($xpath_exp)
6346100
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$prev_sibling and $next_sibling and $prev_sibling->is_text and $XML::Twig::index2gi[$$prev_sibling{'gi'}] eq $XML::Twig::index2gi[$$next_sibling{'gi'}]
6416100
ABCdec
0XX0
10X0
1100
1111
$prev_sibling and $prev_sibling->is_text and $XML::Twig::index2gi[$$first_child{'gi'}] eq $XML::Twig::index2gi[$$prev_sibling{'gi'}]
6418100
ABCdec
0XX0
10X0
1100
1111
$next_sibling and $next_sibling->is_text and $XML::Twig::index2gi[$$last_child{'gi'}] eq $XML::Twig::index2gi[$$next_sibling{'gi'}]
642267
ABdec
0X0
100
111
$$elt{'parent'}{'twig_current'} and $$elt{'last_child'}->is_text
6446100
ABdec
000
011
1X1
$$elt{'first_child'} || $$elt{'next_sibling'}
6450100
Adec
00
11
$target->extra_data || ''
6464100
Adec
00
11
$target->extra_data || ''
6502100
ABdec
0X0
100
111
ref $_[0] and isa($_[0], 'XML::Twig::Elt')
6514100
ABCDdec
0XXX0
10XX0
110X0
11100
11111
not $$ref{'parent'} and $pos =~ /^(before|after)$/ and not exists $$elt{'target'} and not exists $$elt{'comment'}
652367
ABdec
0X0
100
111
my $ids = $$elt{'twig_id_list'} and my $t = $ref->twig
652450
Adec
00
11
$$t{'twig_id_list'} ||= {}
6541100
ABdec
000
011
1X1
exists $$elt{'comment'} or exists $$elt{'target'}
6571100
ABdec
000
011
1X1
exists $$elt{'comment'} or exists $$elt{'target'}
666167
ABdec
000
011
1X1
$options{'normalise_space'} ||= $options{'normalize_space'} || 0
6663100
Adec
00
11
$options{'content_key'} ||= 'content'
6672100
Adec
00
11
$options{'forcearray'} ||= 0
6679100
Adec
00
11
$options{'keyattr'} ||= ['name', 'key', 'id']
668350
Adec
00
11
$prefix ||= ''
6692100
Adec
00
11
$prefix ||= ''
670033
ABdec
000
011
1X1
$options{'var'} ||= $options{'var_attr'}
6705100
Adec
00
11
$options{'var'} ||= 1
670967
ABdec
0X0
100
111
$options{'var_regexp'} and not $options{'var'}
6711100
Adec
00
11
$options{'var_regexp'} ||= '\\$\\{?(\\w+)\\}?'
672467
ABdec
000
011
1X1
$$options{'noattr'} || !$elt->atts
674175
ABCdec
0000
0011
01X1
1XX1
$$options{'force_content'} or $nb_atts or scalar @children > 1
675950
ABCdec
0XX0
10X0
1100
1111
ref $child_data eq 'HASH' && keys %$child_data == 1 && defined(my $grouped_child_data = $$child_data{$grouped_tag})
6769100
ABCdec
0XX0
10X0
1100
1111
ref $child_data eq 'HASH' and keys %$child_data == 1 and defined(my $content = $$child_data{$$options{'content_key'}})
6776100
ABCdec
0000
0011
01X1
1XX1
$$options{'forcearray'} or $$options{'forcearray_tags'}{$child_gi} or $nb_children{$child_gi} > 1
6787100
Adec
00
11
$$data{$child_gi} ||= []
6801100
ABdec
000
011
1X1
$$options{'remove_key_for_all'}{$att} or $$options{'remove_key_for_elt'}{"$gi#$att"}
680967
ABdec
000
011
1X1
$$options{'prefix_key_for_all'}{$att} or $$options{'prefix_key_for_elt'}{"$gi#$att"}
689733
ABdec
000
011
1X1
$elt->first_child('#TEXT') || return('')
698950
Adec
00
11
\%{$tags[$i]{'atts'};} || {}
699850
Adec
00
11
\%{$tags[0]{'atts'};} || {}
7003100
ABdec
0X0
100
111
$previous_match and $text
701733
ABdec
0X0
100
111
$] >= 5.008 and not _keep_encoding()
704167
ABdec
000
011
1X1
$replace_sub{$replace} ||= _install_replace_sub($replace)
705233
ABdec
0X0
100
111
$next_sibling = $$text_elt{'next_sibling'} and $XML::Twig::index2gi[$$text_elt{'gi'}] eq $XML::Twig::index2gi[$$next_sibling{'gi'}]
706767
ABdec
0X0
100
111
$prev_sibling = $$post_match{'prev_sibling'} and $XML::Twig::index2gi[$$post_match{'gi'}] eq $XML::Twig::index2gi[$$prev_sibling{'gi'}]
712675
ABCdec
0XX0
10X0
1100
1111
$e1->is_text and $e2->is_text and $e1->gi eq $e2->gi
715220
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$e1->_last_child and $e1->_last_child->is_pcdata and @e2_children and $e2_children[0]->is_pcdata
7171100
Adec
00
11
$$elt{'empty'} || 0
722133
ABdec
000
011
1X1
shift @_ || $elt->twig
722720
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$ID and $t and defined $$elt{'att'} and exists $$elt{'att'}{$ID}
7370100
ABdec
000
011
1X1
$pretty == $WRAPPED or $pretty == $INDENTEDA
740233
ABdec
000
011
1X1
$_[1] || $_[0]
747367
ABdec
000
011
1X1
isa($new_value, 'XML::Twig::Elt') or isa($new_value, 'XML::Twig')
7475100
ABdec
000
011
1X1
not $new_value or isa($new_value, 'CODE')
749167
ABdec
000
011
1X1
isa($new_value, 'XML::Twig::Elt') or isa($new_value, 'XML::Twig')
7493100
ABdec
000
011
1X1
not $new_value or isa($new_value, 'CODE')
7531100
Adec
00
11
$$elt{'extra_data'} || ''
754967
ABdec
0X0
100
111
$$option{'escape_gt'} and not $replaced_ents =~ />/
755267
ABdec
0X0
100
111
substr($_, 0, 1) eq '#' && substr($_, 0, 9) ne '#default:'
7565100
ABdec
0X0
100
111
$pretty == $INDENTEDA and @att_names == 1
757480
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$empty_tag_style eq $HTML and not $$elt{'first_child'} and not $elt->_extra_data_before_end_tag and $html_empty_elt{$gi}
757767
ABdec
0X0
100
111
$pretty == $INDENTEDA && @att_names == 1
67
ABdec
000
011
1X1
!$$elt{'empty'} || $elt->_extra_data_before_end_tag
100
ABdec
0X0
100
111
$empty_tag_style eq $HTML && $html_empty_elt{$gi}
100
ABdec
0X0
100
111
$pretty == $INDENTEDA && @att_names > 1
758667
ABdec
0X0
100
111
substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:'
760767
ABdec
000
011
1X1
not $parent or $$parent{'contains_text'}
760980
ABCdec
0X00
0X11
1000
1011
11X1
$parent and $$parent{'contains_text'} or $elt->contains_text
761567
ABdec
000
011
1X1
not $parent or $$parent{'contains_text'}
761980
ABCdec
0X00
0X11
1000
1011
11X1
$parent and $$parent{'contains_text'} or $elt->contains_text
762367
ABdec
000
011
1X1
$return or $indent
762767
ABdec
0X0
100
111
$t and $$t{'twig_keep_spaces_in'}
764650
ABCdec
00X0
0100
0111
1XX1
$$elt{'gi'} < $XML::Twig::SPECIAL_GI or $$elt{'empty'} || 0 and not $elt->_extra_data_before_end_tag
7658100
Adec
00
11
$elt->_extra_data_before_end_tag || ''
766067
ABdec
0X0
100
111
substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:'
768150
ABCDdec
0X0X0
0X100
0X111
100X0
10100
10111
11X00
11X11
$parent && !$$parent{'contains_text'} || !$parent and (not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child)
50
ABCdec
0XX0
1000
1011
11X1
not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child
769150
ABCDdec
0X0X0
0X100
0X111
100X0
10100
10111
11X00
11X11
$parent && !$$parent{'contains_text'} || !$parent and (not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child)
100
ABCdec
0XX0
1000
1011
11X1
not $$elt{'contains_text'} and $$elt{'has_flushed_child'} || $elt->_first_child
770167
ABdec
000
011
1X1
$return or $indent
770567
ABdec
0X0
100
111
$t and $$t{'twig_keep_spaces_in'}
7746100
Adec
00
11
$pretty ||= 0
774767
ABdec
000
011
1X1
$pretty_print_style{$pretty} || $pretty
774950
Adec
00
11
$elt->inherit_att('xml:space') || ''
775617
ABCDdec
000X0
00100
00111
01X00
01X11
1XXX1
$output_filter or $pretty == $WRAPPED || $pretty == $INDENTEDC and not $xml_space_preserve
77600
ABCdec
00X0
0100
0111
1X00
1X11
$pretty == $WRAPPED || $pretty == $INDENTEDC and not $xml_space_preserve
777967
ABdec
0X0
100
111
$_[0] && isa($_[0], 'XML::Twig::Elt')
778467
ABdec
0X0
100
111
$_[0] && isa($_[0], 'XML::Twig::Elt')
779650
Adec
00
11
$elt->inherit_att('xml:space') || ''
781050
Adec
00
11
$$elt{'att'}{'xml:space'} || ''
784767
ABdec
0X0
100
111
@options and grep {lc $_ eq 'no_recurse';} @options
7853100
Adec
00
11
$$elt{'first_child'} || ''
7870100
ABdec
000
011
1X1
$_->is_text or exists $$_{'ent'}
7881100
ABdec
0X0
100
111
$_[0] and isa($_[0], 'HASH')
7887100
Adec
00
11
$elt->inherit_att('xml:space') || ''
789440
ABCdec
00X0
0100
0111
1X00
1X11
$pretty == $WRAPPED || $pretty == $INDENTEDC and not $xml_space_preserve
7925100
Adec
00
11
shift @_ || 0
7930100
Adec
00
11
$$elt{'att'}{'xml:space'} || ''
794967
ABdec
0X0
100
111
$pretty >= $INDENTED and not $$elt{'parent'}{'contains_text'}
795267
ABdec
0X0
100
111
$pretty >= $INDENTED and not $$elt{'parent'}{'contains_text'}
797467
ABdec
000
011
1X1
$keep_encoding or $$elt{'asis'}
797967
ABdec
000
011
1X1
$keep_encoding or $$elt{'asis'}
7988100
ABdec
000
011
1X1
$keep_encoding or $$elt{'asis'}
803825
ABCdec
0XX0
10X0
1100
1111
$_[0] and $_[0]{'escape_gt'} and not $replace =~ />/
807040
ABCDdec
0XXX0
10XX0
110X0
11100
11111
$expand_external_entities and $t = $ent->twig and $el = $t->entity_list and $ent_string = $$el{'entities'}{$ent->ent_name}{'val'}
808467
ABdec
0X0
100
111
@options and grep {lc $_ eq 'no_recurse';} @options
8094100
Adec
00
11
$$elt{'first_child'} || ''
8107100
ABdec
000
011
1X1
$_->is_text or exists $$_{'ent'}
8160100
ABCdec
0XX0
10X0
1100
1111
@descendants and $$desc{'next_sibling'} and $$desc{'next_sibling'} == $descendants[0]
818167
ABdec
0X0
100
111
$data and my $start_element = $handler->can('start_element')
818767
ABdec
0X0
100
111
my $data = &$end_tag_data($elt) and my $end_element = $handler->can('end_element')
819267
ABdec
0X0
100
111
exists $$elt{'comment'} and my $comment = $handler->can('comment')
100
ABdec
0X0
100
111
exists $$elt{'pcdata'} and my $characters = $handler->can('characters')
67
ABdec
0X0
100
111
exists $$elt{'target'} and my $pi = $handler->can('processing_instruction')
822467
ABdec
0X0
100
111
substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:'
822867
ABdec
0X0
100
111
substr($att, 0, 1) eq '#' and substr($att, 0, 9) ne '#default:'
823567
ABdec
0X0
100
111
substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:'
824467
ABdec
0X0
100
111
substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:'
826567
ABdec
0X0
100
111
substr($att, 0, 1) eq '#' and substr($att, 0, 9) ne '#default:'
8281100
ABdec
0X0
100
111
my $start_prefix_mapping = $handler->can('start_prefix_mapping') and my(@new_prefix_mappings) = grep({/^\{$XMLNS_URI\}/ unless /^\{[^}]*\}xmlns/;} keys %{$$data{'Attributes'};})
8292100
Adec
00
11
$$elt{'twig_end_prefix_mapping'} ||= []
830867
ABdec
0X0
100
111
substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 1) eq '#' and substr($XML::Twig::index2gi[$$elt{'gi'}], 0, 9) ne '#default:'
831667
ABdec
000
011
1X1
$child->is_text or exists $$child{'ent'}
8372100
ABdec
0X0
100
111
not ref $_[0] and $_[0] eq '#EMPTY'
837771
ABCDdec
00XX0
010X0
01100
01111
1X0X0
1X100
1X111
$XML::Twig::index2gi[$$elt{'gi'}] eq '#PCDATA' || $elt->contains_a_single('#PCDATA') and @_ == 1 and not ref $_[0]
50
ABCdec
0XX0
10X0
1100
1111
$XML::Twig::index2gi[$$elt{'gi'}] eq '#CDATA' and @_ == 1 and not ref $_[0]
839467
ABdec
0X0
100
111
ref $child and isa($child, 'XML::Twig::Elt')
8400100
ABdec
0X0
100
111
my $pcdata = $$elt{'last_child'} and $$elt{'last_child'}->is_pcdata
843067
ABdec
0X0
100
111
defined $args[0] and isa($args[0], 'HASH')
8450100
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$position eq 'before' or $position eq 'after' or $position eq 'first_child' or $position eq 'last_child'
848725
ABCdec
0XX0
10X0
1100
1111
$twig and $twig->root and $twig->root eq $elt
850867
ABdec
0X0
100
111
defined $_[0] and isa($_[0], 'HASH')
856467
ABdec
0X0
100
111
$option && $option eq 'asis'
8565100
ABdec
0X0
100
111
!$asis && !$$elt{'first_child'}{'asis'}
100
ABCDdec
0XXX0
10XX0
11000
11011
111X1
$$elt{'first_child'} and $$elt{'first_child'}->is_pcdata and $asis && $$elt{'first_child'}{'asis'} || !$asis && !$$elt{'first_child'}{'asis'}
25
ABCDEdec
0XXXX0
10X0X0
10X100
10X111
1100X0
110100
110111
111XX1
exists $$elt{'pcdata'} and $asis && $$elt{'asis'} || !$asis && !$$elt{'asis'}
100
ABdec
0X0
100
111
$asis && $$elt{'first_child'}{'asis'}
858767
ABdec
0X0
100
111
$option && $option eq 'asis'
8588100
ABdec
0X0
100
111
!$asis && !$$elt{'last_child'}{'asis'}
80
ABCDdec
0XXX0
10XX0
11000
11011
111X1
$$elt{'last_child'} and $$elt{'last_child'}->is_pcdata and $asis && $$elt{'last_child'}{'asis'} || !$asis && !$$elt{'last_child'}{'asis'}
25
ABCDEdec
0XXXX0
10X0X0
10X100
10X111
1100X0
110100
110111
111XX1
exists $$elt{'pcdata'} and $asis && $$elt{'asis'} || !$asis && !$$elt{'asis'}
100
ABdec
0X0
100
111
$asis && $$elt{'last_child'}{'asis'}
8619100
ABdec
0X0
100
111
$index == 1 and not $ancestor->next_sibling($gi)
863550
Adec
00
11
$child->start_tag({'escape_gt', 1}) || ''
8668100
Adec
00
11
$atts ||= {}
869733
ABdec
000
011
1X1
$att ||= $cond
870667
ABdec
000
011
1X1
$tag ||= $att
8738100
Adec
00
11
$opt{'order'} ||= 'normal'
8739100
Adec
00
11
$opt{'type'} ||= 'alpha'
882567
ABdec
000
011
1X1
$$a_prev{'prev_sibling'} || return(-1)
882767
ABdec
000
011
1X1
$$a_next{'next_sibling'} || return(1)
882967
ABdec
000
011
1X1
$$b_prev{'prev_sibling'} || return(1)
883167
ABdec
000
011
1X1
$$b_next{'next_sibling'} || return(-1)
8852100
ABdec
0X0
100
111
$atts and my(@atts) = $elt->att_names
890267
ABdec
000
011
1X1
not $length or length $string < $length