Condition Coverage

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

line%coveragecondition
12433
ABdec
0X0
100
111
eval 'require Scalar::Util' and defined \&Scalar::Util::weaken
429100
Adec
00
11
$args{'EltClass'} || 'XML::Twig::Elt'
46020
ABCDdec
0XXX0
10XX0
110X0
11100
11111
not $args{'NoLWP'} and not _use('URI') and not _use('URI::File') and not _use('LWP')
483100
ABdec
000
011
1X1
$$self{'twig_roots'} or $args{'ForceEndTagHandlersUsage'}
53550
Adec
00
11
$args{'Comments'} ||= $COMMENTS_DEFAULT
54250
Adec
00
11
$args{'Pi'} ||= $PI_DEFAULT
553100
Adec
00
11
$args{'ParseStartTag'} || \&_parse_start_tag
64867
ABdec
000
011
1X1
not ref $t or not isa($t, 'XML::Twig')
65317
ABCDEdec
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
$] >= 5.008 and ${^UNICODE} and ${^UNICODE} & 24 and isa($_[0], 'GLOB') and -p $_[0]
67167
ABdec
0X0
100
111
isa($returned, 'XML::Twig') and $$returned{'twig_finish_now'}
7350
Adec
00
11
$t->_reset_twig && 0
7420
Adec
00
11
$t->_reset_twig && 0
7490
Adec
00
11
$t->_reset_twig && 0
81467
ABdec
000
011
1X1
$parser ||= 'XML::Parser'->new
858100
ABdec
0X0
100
111
not _check_xml($xml) and $max_tries--
8700
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'}
91620
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
9300
ABdec
0X0
100
111
_use('Unicode::Map8') and _use('Unicode::String')
9610
ABdec
0X0
100
111
$3 and $block_tag{$3}
33
ABdec
0X0
100
111
$2 and $block_tag{$2}
1004100
Adec
00
11
$version ||= 0
103967
ABdec
0X0
100
111
defined $base and not $filename =~ m[^(?:[\\/]|\w+:)]
108767
ABdec
000
011
1X1
$agent ||= 'LWP::UserAgent'->new
11000
ABdec
000
011
1X1
$agent ||= 'LWP::UserAgent'->new
113433
ABdec
0X0
100
111
@saved_default_handler and defined $saved_default_handler[1]
114767
ABdec
0X0
100
111
$$p{'twig'}{'twig_doctype'}{'has_internal'} and not $$p{'twig'}{'expat_1_95_2'}
116167
ABdec
000
011
1X1
isa($_[0], 'GLOB') or isa($_[0], 'IO::Scalar')
1166100
Adec
00
11
$$handlers{'handlers'}{'string'}{$path} || undef
1168100
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)
121550
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
1231100
Adec
00
11
$1 || ''
124667
ABdec
0X0
100
111
!($$stack[-1]{'_tag'} =~ /^#/) && scalar @$stack == $level + 1
128333
ABdec
0X0
100
111
$DEBUG_HANDLER and $path_to_check =~ /\S/
1305100
ABdec
0X0
100
111
defined $last_token_is_sep and not $last_token_is_sep
131533
ABdec
0X0
100
111
$DEBUG_HANDLER >= 1 && "warn q{checking path '${xpath_to_display}'\n};"
1332100
Adec
00
11
$tag ||= '*'
134667
ABdec
000
011
1X1
$last_tag ||= $tag
141880
ABCDdec
00000
00011
001X1
01XX1
1XXX1
$func or $string_regexp or $string_test_num or $string_test_alpha
142033
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)/
147967
ABdec
000
011
1X1
shift @_ || return
1489100
Adec
00
11
$$t{'twig_handlers'} ||= {}
1495100
Adec
00
11
$$t{'twig_handlers'} || undef
150350
Adec
00
11
$$t{'twig_starttag_handlers'} ||= {}
1509100
Adec
00
11
$$t{'twig_starttag_handlers'} || undef
151750
Adec
00
11
$$t{'twig_ignore_elts_handlers'} ||= {}
1531100
Adec
00
11
$$t{'twig_endtag_handlers'} ||= {}
1553100
Adec
00
11
$$t{'twig_handlers'} ||= {}
159850
Adec
00
11
$t->_reset_twig && 0
162875
ABCdec
0000
0011
01X1
1XX1
$$t{'twig_stored_spaces'} or $option{'force'} or $$t{'twig_preserve_space'}
163680
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'}
175967
ABdec
0X0
100
111
$$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve'
1768100
ABdec
0X0
100
111
not $$t{'twig_keep_original_prefix'} and my $mapped_prefix = $$t{'twig_map_xmlns'}{$uri}
182367
ABdec
000
011
1X1
$$t{'twig_map_xmlns'}{$$ns_info{'uri'}} || $$ns_info{'prefix'}
184275
ABCdec
0XX0
10X0
1100
1111
not exists $value{$att} and exists $$attlist{$att}{'default'} and $$attlist{$att}{'default'} ne '#IMPLIED'
1934100
ABdec
0X0
100
111
$$t{'twig_root_depth'} and $p->depth == $$t{'twig_root_depth'}
194767
ABdec
0X0
100
111
$$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve'
1990100
ABdec
0X0
100
111
not @found_handlers and defined $$handlers{'handlers'}{$DEFAULT}
1993100
ABdec
0X0
100
111
@found_handlers and $$t{'twig_do_not_chain_handlers'}
2007100
ABdec
0X0
100
111
not $uri and not $name =~ /^xml/
211067
ABdec
0X0
100
111
$t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'}
216567
ABdec
000
011
1X1
$$t{'twig_handlers'}{'pi_handlers'} || return
2176100
ABdec
0X0
100
111
defined $data && $data ne ''
2189100
ABdec
000
011
1X1
not defined $comment or $comment eq ''
226467
ABdec
0X0
100
111
$t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'}
228967
ABdec
000
011
1X1
$$t{$type} ||= $$t{'twig_elt_class'}->new('#CPI')
2354100
ABdec
0X0
100
111
$$t{'twig_keep_spaces_in'} and $$t{'twig_keep_spaces_in'}{$gi}
2356100
ABdec
0X0
100
111
$$t{'twig_discard_spaces_in'} and $$t{'twig_discard_spaces_in'}{$gi}
240033
ABdec
0X0
100
111
defined $$ent{'val'} and not $ent_decl =~ /["']/
2438100
Adec
00
11
$level || 0
244750
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
245750
Adec
00
11
$$t{'twig_doctype'} ||= {}
24720
Adec
00
11
$internal ||= ''
2479100
ABdec
0X0
100
111
$$t{'twig_read_external_dtd'} and $sysid
2484100
Adec
00
11
$$t{'ErrorContext'} || 0
2499100
Adec
00
11
$$t{'twig_dtd'} ||= {}
2500100
Adec
00
11
$$t{'twig_dtd'}{'model'} ||= {}
2501100
Adec
00
11
$$t{'twig_dtd'}{'elt_list'} ||= []
250433
ABdec
0X0
100
111
$parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/
252150
Adec
00
11
$$t{'twig_dtd'} ||= {}
2522100
Adec
00
11
$$t{'twig_dtd'}{$gi} ||= {}
252433
ABdec
0X0
100
111
$parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/
256067
ABdec
0X0
100
111
$p->original_string =~ /^</ and $p->original_string =~ />$/
2628100
ABdec
000
011
1X1
$$t{'twig_xmldecl'} or $$t{'output_encoding'}
267750
Adec
00
11
$$doctype{'name'} || ''
2683100
Adec
00
11
$$doctype{'sysid'} || ''
2689100
Adec
00
11
$$doctype{'pub'} || ''
2695100
Adec
00
11
$$doctype{'internal'} || ''
273533
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
2752100
Adec
00
11
$args{'UpdateDTD'} || ''
2760100
ABdec
0X0
100
111
$$doctype{'sysid'} and not $$doctype{'pub'}
276533
ABdec
0X0
100
111
not $$t{'twig_dtd'} and keys %{$t->entity_list;}
2773100
Adec
00
11
$t->entity_list->text || ''
281167
ABdec
000
011
1X1
$$t{'leading_cpi'} || return('')
281767
ABdec
000
011
1X1
$$t{'trailing_cpi'} || return('')
2823100
Adec
00
11
$$t{'trailing_cpi_text'} || ''
289867
ABdec
0X0
100
111
$last_elt and $last_elt->in($elt)
291267
ABdec
0X0
100
111
$last_elt and $elt == $last_elt
300067
ABdec
0X0
100
111
$last_elt and $last_elt->in($elt)
300867
ABdec
0X0
100
111
$last_elt and $elt == $last_elt
3040100
ABdec
0X0
100
111
$elt_class->can($att) and not $accessor{$att}
306133
ABdec
000
011
1X1
$t->root || return(undef)
306833
ABdec
000
011
1X1
$t->root || return(undef)
3093100
ABdec
0X0
100
111
@unique and $unique[-1] == $current
3123100
ABdec
0X0
100
111
$cond && !$root->passes($cond)
327767
ABdec
000
011
1X1
not $input_filter or isa($input_filter, 'CODE')
333467
ABdec
0X0
100
111
$$t{'twig_root'} and isa($$t{'twig_root'}, 'XML::Twig')
337625
ABCdec
0XX0
10X0
1100
1111
$$p{'twig'}{'expat_1_95_2'} and $p->recognized_string eq '[' and not $$p{'twig'}{'expat_1_95_2_seen_bracket'}
342867
ABdec
0X0
100
111
$sysid and not $pubid
343067
ABdec
0X0
100
111
$internal and not $$p{'twig'}{'expat_1_95_2'}
343167
ABdec
000
011
1X1
$internal or $$p{'twig'}{'expat_1_95_2'}
344767
ABdec
0X0
100
111
$sysid and not $pubid
345067
ABdec
000
011
1X1
$internal or $$p{'twig'}{'expat_1_95_2'}
348067
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
351175
ABCdec
0XX0
1000
1011
11X1
$tag and !@handlers || $last_handler_res
352867
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
353567
ABdec
000
011
1X1
&$handler($t, $gi) || last
355767
ABdec
000
011
1X1
$$t{'twig_output_fh'} || select || \*STDOUT
355967
ABdec
000
011
1X1
$$t{'twig_handlers'}{'pi_handlers'}{$target} || $$t{'twig_handlers'}{'pi_handlers'}{''}
362233
ABdec
000
011
1X1
&$handler($t, $gi) || last
3634100
ABdec
0X0
100
111
$elt && isa($elt, 'XML::Twig::Elt')
3640100
ABCDdec
00X00
00X11
01000
01011
011X1
1XXX1
$elt == $current or $$current{'last_child'} and $elt == $$current{'last_child'} or $current->in($elt)
364750
Adec
00
11
shift @_ || 1
366767
ABdec
0X0
100
111
$$elt_in_stack{'_elt'} and $elt == $$elt_in_stack{'_elt'}
3678100
ABdec
0X0
100
111
$output_fh and not $$t{'twig_output_fh_selected'}
370350
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
372350
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
373250
Adec
00
11
$$t{'twig_xmldecl'} ||= {}
380067
ABdec
0X0
100
111
$last_elt and $last_elt->in($elt)
381767
ABdec
0X0
100
111
$last_elt and $elt == $last_elt
38670
ABdec
0X0
100
111
_use('Unicode::Map8') and _use('Unicode::String')
388033
ABdec
000
011
1X1
$_[1] || $_[0]
38810
ABdec
0X0
100
111
_use('Unicode::Map8') and _use('Unicode::String')
405467
ABdec
0X0
100
111
$ents_to_add and %$ents_to_add
412833
ABdec
000
011
1X1
ref $class || $class
417675
ABCdec
0XX0
10X0
1100
1111
defined $$ent{'val'} and not defined $$ent{'sysid'} and not defined $$ent{'pubid'}
428933
ABdec
0X0
100
111
eval 'require Scalar::Util' and defined &Scalar::Util::weaken
430467
ABdec
000
011
1X1
ref $class || $class
4317100
ABdec
0X0
100
111
$atts and defined $$atts{'#CDATA'}
4458100
ABdec
000
011
1X1
$DEFAULT_NS{$prefix} || $elt->_inherit_att_through_cut($ns_att) || ''
44690
ABdec
0X0
100
111
not $missing_prefix{$prefix} and not $elt->namespace
45090
ABdec
0X0
100
111
$elt->_ns_prefix and $elt->namespace eq $uri
455733
ABdec
000
011
1X1
exists $$elt{'ent'} || $$elt{'ent_name'}
4563100
ABdec
000
011
1X1
exists $$elt{'pcdata'} || exists $$elt{'cdata'}
4567100
Adec
00
11
$_[0]{'empty'} || 0
457350
Adec
00
11
$_[0]{'empty'} or 0
460233
ABdec
000
011
1X1
$elt->twig || return
4625100
Adec
00
11
$_[0]{'extra_data_before_end_tag'} || ''
4657100
ABdec
000
011
1X1
_match_extra_data_words($elt, $initial, $modified) or _match_extra_data_chars($elt, $initial, $modified)
469333
ABdec
000
011
1X1
shift @$positions || $length + 1
471333
ABdec
000
011
1X1
shift @$positions || $length + 1
4734100
ABdec
0X0
100
111
@$long and $s_word ne $l_word
4738100
ABdec
0X0
100
111
not @$long and $s_word ne $l_word
4767100
Adec
00
11
$_[0]{'extra_data'} || ''
479933
ABdec
0X0
100
111
defined $data and $data ne ''
4858100
Adec
00
11
@children || 1
48780
ABdec
000
011
1X1
$$elt{'parent'} || $elt->former_parent
0
ABdec
000
011
1X1
$$elt{'parent'} or $elt->former_parent
4961100
ABdec
0X0
100
111
$gi and $gi ne '*'
4973100
ABdec
0X0
100
111
$tag && $tag ne '*'
500133
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)/
504567
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
505967
ABdec
000
011
1X1
shift @_ || return($$elt{'parent'})
506067
ABdec
000
011
1X1
$$elt{'parent'} || return
67
ABdec
000
011
1X1
not $elt or $elt->passes($cond)
507367
ABdec
000
011
1X1
shift @_ || return($$elt{'first_child'})
507567
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5076100
ABdec
0X0
100
111
$child and not &$test_cond($child)
511867
ABdec
000
011
1X1
shift @_ || return($$elt{'last_child'})
511967
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5121100
ABdec
0X0
100
111
$child and not &$test_cond($child)
513667
ABdec
000
011
1X1
shift @_ || return($$elt{'prev_sibling'})
513767
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5139100
ABdec
0X0
100
111
$sibling and not &$test_cond($sibling)
515067
ABdec
000
011
1X1
shift @_ || return($$elt{'next_sibling'})
515133
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
5153100
ABdec
0X0
100
111
$sibling and not &$test_cond($sibling)
518367
ABdec
0X0
100
111
$elt->tag eq 'span' and $elt->class
518967
ABdec
0X0
100
111
$elt->tag eq 'div' and $elt->class
5209100
Adec
00
11
$_[0] || ''
527567
ABdec
000
011
1X1
$elt->twig || $elt
529633
ABdec
0X0
100
111
$_[0] && isa($_[0], 'CODE')
531167
ABdec
000
011
1X1
shift @_ || $elt->twig
5423100
ABCdec
0XX0
1000
1011
11X1
defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]}
543767
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'}]}
5471100
ABdec
0X0
100
111
defined $_[0] and isa($_[0], 'XML::Twig::Elt')
547967
ABdec
000
011
1X1
$cond_cache{$cond} ||= _install_cond($cond)
548389
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)
5490100
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
5498100
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
5503100
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
550467
ABdec
000
011
1X1
$$next_elt{'parent'} || return(undef)
5506100
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
5527100
ABdec
000
011
1X1
not $cond or $last_descendant->matches($cond)
5548100
ABdec
0X0
100
111
defined $_[0] and isa($_[0], 'XML::Twig::Elt')
556267
ABdec
000
011
1X1
$$elt{'parent'} || return(undef)
5571100
ABdec
0X0
100
111
$elt and not $$elt{'next_sibling'}
557867
ABdec
000
011
1X1
$elt->_following_elt || return(undef)
557967
ABdec
000
011
1X1
not $cond or $elt->matches($cond)
5599100
ABdec
0X0
100
111
$elt and not $$elt{'prev_sibling'}
560667
ABdec
000
011
1X1
$elt->_preceding_elt || return(undef)
560767
ABdec
000
011
1X1
not $cond or $elt->matches($cond)
563367
ABdec
000
011
1X1
shift @_ || return(undef)
563567
ABdec
000
011
1X1
$elt->next_elt(@_) || return(undef)
582350
Adec
00
11
shift @_ || ''
5824100
ABdec
000
011
1X1
not $cond or $elt->matches($cond)
586633
ABdec
000
011
1X1
$$elt{'parent'} || last
586933
ABdec
000
011
1X1
$$next_elt{'parent'} || last MAIN
587433
ABdec
000
011
1X1
$next_elt || last MAIN
5890100
ABdec
000
011
1X1
not $cond or defined($ind = $XML::Twig::gi2index{$cond})
590233
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
590967
ABdec
0X0
100
111
$subtree_root and $elt == $subtree_root
591233
ABdec
000
011
1X1
$$elt{'parent'} || last
591467
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
591533
ABdec
000
011
1X1
$$next_elt{'parent'} || last
591767
ABdec
0X0
100
111
$subtree_root and $subtree_root == $next_elt
592033
ABdec
000
011
1X1
$next_elt || last
5921100
ABdec
000
011
1X1
not $cond or $$elt{'gi'} eq $ind
5989100
ABdec
0X0
100
111
$_[0] and not $elt->matches(@_)
6037100
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
6060100
ABdec
000
011
1X1
not $gi or $gi eq '*'
6064100
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*$/
6106100
ABdec
0X0
100
111
not $syntax_error and $pred
6161100
ABdec
000
011
1X1
$xpath{$xpath_exp} ||= _install_xpath($xpath_exp)
6224100
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'}]
6294100
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'}]
6296100
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'}]
630067
ABdec
0X0
100
111
$$elt{'parent'}{'twig_current'} and $$elt{'last_child'}->is_text
6324100
ABdec
000
011
1X1
$$elt{'first_child'} || $$elt{'next_sibling'}
6328100
Adec
00
11
$target->extra_data || ''
6342100
Adec
00
11
$target->extra_data || ''
6392100
ABCDdec
0XXX0
10XX0
110X0
11100
11111
not $$ref{'parent'} and $pos =~ /^(before|after)$/ and not exists $$elt{'target'} and not exists $$elt{'comment'}
640167
ABdec
0X0
100
111
my $ids = $$elt{'twig_id_list'} and my $t = $ref->twig
640250
Adec
00
11
$$t{'twig_id_list'} ||= {}
6416100
ABdec
000
011
1X1
exists $$elt{'comment'} or exists $$elt{'target'}
6446100
ABdec
000
011
1X1
exists $$elt{'comment'} or exists $$elt{'target'}
653667
ABdec
000
011
1X1
$options{'normalise_space'} ||= $options{'normalize_space'} || 0
6538100
Adec
00
11
$options{'content_key'} ||= 'content'
6547100
Adec
00
11
$options{'forcearray'} ||= 0
6554100
Adec
00
11
$options{'keyattr'} ||= ['name', 'key', 'id']
655850
Adec
00
11
$prefix ||= ''
6567100
Adec
00
11
$prefix ||= ''
657533
ABdec
000
011
1X1
$options{'var'} ||= $options{'var_attr'}
6580100
Adec
00
11
$options{'var'} ||= 1
658467
ABdec
0X0
100
111
$options{'var_regexp'} and not $options{'var'}
6586100
Adec
00
11
$options{'var_regexp'} ||= '\\$\\{?(\\w+)\\}?'
659967
ABdec
000
011
1X1
$$options{'noattr'} || !$elt->atts
661675
ABCdec
0000
0011
01X1
1XX1
$$options{'force_content'} or $nb_atts or scalar @children > 1
663450
ABCdec
0XX0
10X0
1100
1111
ref $child_data eq 'HASH' && keys %$child_data == 1 && d