Branch Coverage

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

line%coveragebranch
11350TFunless $parser_version >= $needVersion
11550TFif ($] >= 5.008)
12450TFif (eval 'require Scalar::Util' and defined \&Scalar::Util::weaken) { }
0TFelsif (eval 'require WeakRef') { }
382100TFunless ($args{'MoreOptions'})
384100TFunless $valid_option{$arg}
396100TFif (exists $args{'TwigHandlers'})
403100TFif (exists $args{'StartTagHandlers'})
408100TFif (exists $args{'DoNotChainHandlers'})
411100TFif (exists $args{'IgnoreElts'})
41350TFif (isa($args{'IgnoreElts'}, 'ARRAY'))
418100TFif (exists $args{'Index'})
421100TFif (ref $index eq 'ARRAY')
430100TFif (exists $args{'EltClass'})
432100TFif (exists $args{'MapXmlns'})
438100TFif (exists $args{'KeepOriginalPrefix'})
446100TFif ($args{'ExpandExternalEnts'}) { }
450100TFif ($args{'ExpandExternalEnts'} == -1)
46050TFif (not $args{'NoLWP'} and not _use('URI') and not _use('URI::File') and not _use('LWP')) { }
465100TFif ($args{'DoNotEscapeAmpInAtts'}) { }
477100TFif ($args{'TwigRoots'})
482100TFif ($args{'EndTagHandlers'})
483100TFunless ($$self{'twig_roots'} or $args{'ForceEndTagHandlersUsage'})
496100TFif ($args{'TwigPrintOutsideRoots'})
497100TFunless $$self{'twig_roots'}
500100TFif (_is_fh($args{'TwigPrintOutsideRoots'}))
506100TFif ($args{'KeepSpaces'})
507100TFif $args{'DiscardSpaces'}
508100TFif $args{'KeepSpacesIn'}
512100TFif ($args{'DiscardSpaces'})
513100TFif $args{'KeepSpacesIn'}
517100TFif ($args{'KeepSpacesIn'})
518100TFif $args{'DiscardSpacesIn'}
525100TFif ($args{'DiscardSpacesIn'})
533100TFunless $$self{'twig_keep_spaces'}
536100TFif ($args{'Comments'} eq 'drop') { }
100TFelsif ($args{'Comments'} eq 'keep') { }
100TFelsif ($args{'Comments'} eq 'process') { }
543100TFif ($args{'Pi'} eq 'drop') { }
100TFelsif ($args{'Pi'} eq 'keep') { }
100TFelsif ($args{'Pi'} eq 'process') { }
549100TFif ($args{'KeepEncoding'}) { }
554100TFif defined $args{'ParseStartTag'}
559100TFif $args{'ParseStartTag'}
562100TFif ($args{'OutputFilter'}) { }
569100TFif ($args{'RemoveCdata'}) { }
576100TFif ($args{'OutputTextFilter'}) { }
584100TFif (exists $args{'KeepAttsOrder'}) { }
586100TFif (_use('Tie::IxHash')) { }
595100TFif ($args{'PrettyPrint'})
596100TFif ($args{'Quote'})
597100TFif ($args{'EmptyTags'})
599100TFif (exists $args{'Id'})
600100TFif ($args{'NoProlog'})
601100TFif ($args{'DoNotOutputDTD'})
602100TFif ($args{'LoadDTD'})
603100TFif ($args{'CharHandler'})
605100TFif ($args{'InputFilter'})
606100TFif ($args{'NoExpand'})
607100TFif (my $output_encoding = $args{'OutputEncoding'})
609100TFif (my $tdh = $args{'TopDownHandlers'})
612100TFif ($$self{'twig_roots'}) { }
613100TFif ($$self{'twig_default_print'}) { }
614100TFif ($$self{'twig_keep_encoding'}) { }
639100TFif $weakrefs
648100TFif (not ref $t or not isa($t, 'XML::Twig'))
65350TFif ($] >= 5.008 and ${^UNICODE} and ${^UNICODE} & 24 and isa($_[0], 'GLOB') and -p $_[0])
670100TFif (not $t)
671100TFif (isa($returned, 'XML::Twig') and $$returned{'twig_finish_now'}) { }
69450TFunless _use('File::Temp')
70750TFunless chmod $mode, $tmpfile
709100TFif ($suffix)
711100TFif ($suffix =~ /\*/) { }
71450TFunless rename $file, $backup
71650TFunless rename $tmpfile, $file
73550TF$@ ? :
74050TFunless _use('LWP::Simple')
74250TF$@ ? :
74950TF$@ ? :
755100TF$$t{'ErrorContext'} ? :
76450TF$$t{'ErrorContext'} ? :
766100TFisa($content, 'GLOB') ? :
773100TFif (isa($to_parse, 'GLOB')) { }
100TFelsif ($to_parse =~ /^\s*</) { }
100TFelsif ($to_parse =~ m[^\w+://.*\.html?$]) { }
100TFelsif ($to_parse =~ m[^\w+://]) { }
100TFelsif ($to_parse =~ /\.html?$/) { }
774100TF$to_parse =~ /<html/i ? :
777100TFunless _use('LWP::Simple')
780100TFunless _use('LWP::Simple')
78350TFif ($xml_parse_ok) { }
7870TFif ($doc =~ /<html/i) { }
801100TFif (_is_well_formed_xml($_[0])) { }
805100TFif (_is_well_formed_xml($html)) { }
816100TF$@ ? :
833100TFunless _use('HTML::TreeBuilder', '3.13')
846100TFif ($$options{'indent'})
86150TFif ($@ =~ /^\s*xml declaration not at start of external entity/) { }
50TFelsif ($@ =~ /^\s*not well-formed \(invalid token\)/) { }
867100TFunless (keys %xml_parser_encoding)
869100TFif (not $add_decl) { }
87050TFif ($xml_parser_encoding{$encoding}) { }
0TFelsif ($encoding eq 'euc-jp' and $xml_parser_encoding{'x-euc-jp-jisx0221'}) { }
0TFelsif ($encoding eq 'shift-jis' and $xml_parser_encoding{'x-sjis-jisx0221'}) { }
87750TFif ($add_decl) { }
91650TFif ($$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)
93050TFif (_use('Encode')) { }
0TFelsif (_use('Text::Iconv')) { }
0TFelsif (_use('Unicode::Map8') and _use('Unicode::String')) { }
9340TFif ($converter)
96150TFif ($2 and $block_tag{$2}) { }
0TFelsif ($3 and $block_tag{$3}) { }
96250TFunless $2 =~ m[/>]
980100TFif ($text_type{$type}) { }
1005100TFif ($disallowed{$module})
1006100TFif ($used{$module})
1007100TFif (eval "require $module") { }
100950TFif (${"${module}::VERSION";} >= $version) { }
1021100TFif ($n > 0) { }
100TFelsif ($n < 0) { }
1022100TFif $i == $n
100TFif (&$coderef)
1024100TFif $i == $n
100TFif (&$coderef)
1032100TFif ($uri =~ m[^\w+://]) { }
1039100TFif (defined $base and not $filename =~ m[^(?:[\\/]|\w+:)])
1050100TFunless open TWIG_TO_SLURP, "<$filename"
107350TFunless _use('LWP')
107450TFif ($^O ne 'VMS') { }
107550TFunless pipe README, WRITEME
1076100TFif (my $pid = fork) { }
1079100TF$safe ? :
1081100TF$@ ? :
1093100TFunless $response->is_success
11030TFunless $response->is_success
11040TF$safe ? :
11050TF$@ ? :
1127100TFif $$t{'twig_keep_encoding'}
113450TFif (@saved_default_handler and defined $saved_default_handler[1]) { }
1147100TFif ($$p{'twig'}{'twig_doctype'}{'has_internal'} and not $$p{'twig'}{'expat_1_95_2'})
1161100TFunless $_[0]
100TFif isa($_[0], 'GLOB') or isa($_[0], 'IO::Scalar')
1168100TFunless _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)
1186100TFif ($path =~ /^\s*($ALL|$DEFAULT|#COMMENT)\s*$/io) { }
1196100TFif (my $handler_data = _parse_xpath_handler($path, $handler)) { }
1208100TF$$handlers{'xpath_handler'}{$tag} ? :
1210100TFif ($prev_handler)
1212100TFif $$handler_data{'handler'}
1215100TFunless ($$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)
1230100TFif ($path =~ /^\s*(?:\?|#PI)\s*(?:([^\s]*)\s*)$/) { }
1244100TFif ($path =~ /^ \s* level \s* \( \s* ([0-9]+) \s* \) \s* $/ox) { }
1260100TFif ($path =~ /^\(\?([xism]*)(?:-[xism]*)?:(.*)\)$/) { }
127950TFif ($DEBUG_HANDLER >= 1)
128350TFif ($DEBUG_HANDLER and $path_to_check =~ /\S/)
1284100TFif $path_to_check =~ /\S/
1300100TFif ($2) { }
1301100TFif ($last_token_is_sep)
1305100TFif (defined $last_token_is_sep and not $last_token_is_sep)
1311100TFif ($last_token_is_sep)
1325100TF$xpath_original =~ m[^\s*/(?!/)] ? :
133450TF$DEBUG_HANDLER >= 2 ? :
1336100TFif ($predicate)
133750TFif ($DEBUG_HANDLER >= 2)
134050TFif ($DEBUG_HANDLER >= 2)
1343100TF$tag ne '*' ? :
1349100TFif ($sep eq '/') { }
50TFelsif ($sep eq '//') { }
137750TF$DEBUG_HANDLER >= 2 ? :
1388100TFif ($anchored)
139050TF$DEBUG_HANDLER >= 2 ? :
139450TFif $DEBUG_HANDLER >= 2
139650TFif $DEBUG_HANDLER >= 1
139850TFif ($@)
140150TFif $DEBUG_HANDLER >= 1
140250TFif $DEBUG_HANDLER >= 1
1418100TFif ($func or $string_regexp or $string_test_num or $string_test_alpha)
1420100TFif (defined $string) { }
100TFelsif ($att) { }
100TFelsif ($bare_att) { }
100TFelsif ($num_test and $num_test eq '=') { }
100TFelsif ($alpha_test) { }
100TFelsif ($func and $func =~ /^string/) { }
100TFelsif ($string_regexp and $string_regexp =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_MATCH)\s*($REG_REGEXP)/) { }
100TFelsif ($string_test_alpha and $string_test_alpha =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_COMP)\s*($REG_STRING)/) { }
50TFelsif ($string_test_num and $string_test_num =~ /string\(\s*($REG_NAME)\s*\)\s*($REG_COMP)\s*($REG_NUMBER)/) { }
50TFelsif ($and_or) { }
1421100TF$att =~ /^#/ ? :
1424100TF$bare_att =~ /^#/ ? :
14360TF$2 eq '=' ? :
14390TF$and_or eq 'and' ? :
147450TFif $$handlers{'attcond_handlers'}
1554100TFif isa($$handlers{$path}, 'CODE')
1564100TFif (my $type = $$handler_data{'test_on_text'})
1578100TFif ($$t{'twig_parsing'})
1582100TFif $weakrefs
1598100TF$@ ? :
1604100TF$@ ? :
1618100TFif $t->root
1627100TFunless $$t{'twig_current'}
1628100TFif ($$t{'twig_stored_spaces'} or $option{'force'} or $$t{'twig_preserve_space'})
1629100TFif ($$t{'twig_current'}->is_pcdata) { }
1633100TFunless (defined $$t{'twig_space_policy'}{$current_gi})
1636100TFif ($$t{'twig_space_policy'}{$current_gi} or not $$t{'twig_stored_spaces'} =~ /\n/ or $option{'force'} or $$t{'twig_preserve_space'})
1660100TFif ($$t{'twig_in_pcdata'})
1667100TFif (my $func = $$t{'parse_start_tag'}) { }
100TFelsif ($$t{'twig_entities_in_attribute'}) { }
1676100TFif ($$t{'twig_read_external_dtd'})
1679100TFif (my $filter = $$t{'twig_input_filter'})
1684100TFif $$t{'twig_map_xmlns'}
1691100TFif $weakrefs
1694100TFif $parent
1698100TFif ($parent) { }
1700100TFif ($prev_sibling)
1706100TFunless $$parent{'first_child'}
171350TFif defined $$t{'twig_dtd_handler'}
1718100TFif ($$t{'twig_default_print'}) { }
100TFelsif ($$t{'twig_roots'}) { }
1726100TF$p->recognized_string =~ m[/\s*>$]s ? :
1728100TFif $$t{'extra_data'}
1733100TFif (defined $id)
1735100TFif $weakrefs
1739100TFif ($$t{'twig_starttag_handlers'})
1746100TFunless &$handler($t, $elt)
1748100TFif (my $all = $$t{'twig_starttag_handlers'}{'handlers'}{$ALL})
1753100TFif ($$t{'twig_ignore_elts_handlers'})
1756100TFif (@handlers)
1759100TFif ($$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve')
1768100TFif (not $$t{'twig_keep_original_prefix'} and my $mapped_prefix = $$t{'twig_map_xmlns'}{$uri})
1771100TFif ($new_prefix eq '#default') { }
1777100TFif ($$t{'twig_keep_original_prefix'}) { }
1782100TFif ($$ns_info{'mapped_prefix'})
1788100TFif ($att_name) { }
1791100TFif ($$ns_info{'mapped_prefix'})
1800100TFif $map_att
1806100TFif ($att_name) { }
1820100TFunless $$ns_info{'uri'}
1831100TFif ($p->expand_ns_prefix($prefix) eq $uri)
1842100TFif (not exists $value{$att} and exists $$attlist{$att}{'default'} and $$attlist{$att}{'default'} ne '#IMPLIED')
1863100TFif ($string =~ s[^<\s*($REG_NAME)\s*[\s>/]][]s) { }
1876100TFif $weakrefs
1886100TFif ($$t{'twig_map_xmlns'})
1895100TFif ($$t{'twig_in_pcdata'})
189750TFif $$elt{'parent'}
1903100TFif $parent
1907100TFif ($$parent{'twig_to_be_normalized'})
1909100TFif $$t{'extra_data'}
1912100TFif ($$t{'twig_handlers'})
1916100TFif ($$t{'twig_tdh'}) { }
1917100TFif (@handlers)
1918100TFif (my $all = $$t{'twig_handlers'}{'handlers'}{$ALL})
1926100TFunless &$handler($t, $elt)
1928100TFif (my $all = $$t{'twig_handlers'}{'handlers'}{$ALL})
1934100TFif ($$t{'twig_root_depth'} and $p->depth == $$t{'twig_root_depth'})
1935100TFif ($$t{'twig_default_print'}) { }
1938100TFif ($$t{'twig_keep_encoding'}) { }
1947100TFif ($$elt{'att'}{'xml:space'} and $$elt{'att'}{'xml:space'} eq 'preserve')
195550TFif (@{$$t{'twig_handlers_to_trigger'};})
196050TFunless &$handler($t, $handled_elt)
1983100TFif (my $found_path = &$trigger($$t{'_twig_context_stack'}))
1990100TFif (not @found_handlers and defined $$handlers{'handlers'}{$DEFAULT})
1993100TFif (@found_handlers and $$t{'twig_do_not_chain_handlers'})
2007100TFif (not $uri and not $name =~ /^xml/)
2008100TFif ($uri) { }
2009100TFif (my $mapped_prefix = $$t{'twig_map_xmlns'}{$uri}) { }
2013100TFif ($prefix eq '#default')
2014100TF$prefix ? :
2027100TFif ($$t{'twig_keep_encoding'})
2028100TFif (not $$t{'twig_in_cdata'}) { }
2033100TFif (length $string < 1024) { }
2043100TFif ($$t{'twig_input_filter'})
2046100TFif ($$t{'twig_char_handler'})
2051100TFif ($$t{'twig_in_cdata'}) { }
100TFelsif ($$t{'twig_in_pcdata'}) { }
2057100TFif ($$t{'extra_data'})
2065100TFif ($string =~ /\A\s*\Z/s) { }
2066100TFif ($$t{'extra_data'}) { }
2081100TFif ($$t{'extra_data'})
2099100TFif ($$t{'twig_in_pcdata'}) { }
2110100TFif ($t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'})
2116100TFif (my $prev_sibling = $$twig_current{'last_child'}) { }
2129100TFif ($$t{'extra_data'})
2147100TFif ($$t{'twig_handlers'})
2151100TFunless &$handler($t, $elt)
216750TFunless &$handler($t, $pi)
100TFif ($handler)
2172100TFif (my $handler = $$t{'twig_handlers'}{'pi_handlers'}{$target})
2174100TFif (my $handler = $$t{'twig_handlers'}{'pi_handlers'}{''})
2176100TFdefined $data && $data ne '' ? :
2181100TFif (my $handler = $$t{'twig_handlers'}{'handlers'}{'#COMMENT'})
2187100TFif (my $handler = $$t{'twig_handlers'}{'handlers'}{'#COMMENT'})
2189100TFif (not defined $comment or $comment eq '')
2202100TFif ($$t{'twig_keep_encoding'})
2215100TFif ($$t{'twig_keep_encoding'})
2228100TFif ($$t{'twig_input_filter'})
2232100TFif ($keep) { }
100TFelsif ($process) { }
2234100TFif ($$t{'twig_stored_spaces'})
2249100TFif ($$t{'extra_data'})
2254100TFif (not $t->root) { }
100TFelsif ($$t{'twig_in_pcdata'}) { }
100TFelsif ($twig_current) { }
2264100TFif ($t->_space_policy($XML::Twig::index2gi[$$twig_current{'gi'}]) and $$t{'twig_stored_spaces'})
2273100TFif ($twig_current)
2299100TF$p->isa('XML::Twig') ? :
2302100TFif ($$t{'extra_data'})
2307100TFif $$t{'twig_tdh'}
2309100TFif $$t{'twig_original_selected_fh'}
2311100TFif (exists $$t{'twig_autoflush_data'})
2313100TFif $$t{'twig_autoflush_data'}{'fh'}
2314100TFif $$t{'twig_autoflush_data'}{'args'}
2336100TFif ($prev_sibling) { }
2352100TFif $$t{'twig_discard_spaces'}
2353100TFif $$t{'twig_keep_spaces'}
2354100TFif $$t{'twig_keep_spaces_in'} and $$t{'twig_keep_spaces_in'}{$gi}
2356100TFif $$t{'twig_discard_spaces_in'} and $$t{'twig_discard_spaces_in'}{$gi}
2372100TFif ($sysid)
2373100TFif ($ndata) { }
2374100TFif (not -f _based_filename($sysid, $p->base))
2377100TFif ($$t{'twig_expand_external_ents'})
2379100TFif (not defined $val)
2380100TFif ($$t{'twig_extern_ent_nofail'}) { }
2390100TFif ($missing_entity)
239350TFif ($entity_list)
239550TFif ($parser_version > 2.27)
2399100TFif ($$t{'twig_keep_encoding'})
240050TFif (defined $$ent{'val'} and not $ent_decl =~ /["']/)
24020TF$val =~ /"/ ? :
240750TFunless $$t{'twig_doctype'}{'internal'} =~ /<!ENTITY\s+$name\s+/
241850TFif ($$t{'twig_no_expand'})
24190TF$$t{'twig_keep_encoding'} ? :
2424100TFif (not defined $ent_content)
242950TFif ($$t{'twig_extern_ent_nofail'}) { }
246350TFif ($parser_version > 2.27) { }
2479100TFif ($$t{'twig_read_external_dtd'} and $sysid)
248850TFif $t_dtd->entity_list
250450TFif ($parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/)
250550TF$XML::Twig::Elt::keep_encoding ? :
250650TFunless ($text)
252450TFif ($parser_version > 2.27 and $$t{'twig_doctype'}{'internal'} =~ /(^|>)\s*$/)
252550TF$XML::Twig::Elt::keep_encoding ? :
252650TFunless ($text)
2530100TFif $fixed
253150TFif defined $default
2533100TFif ($$t{'twig_dtd'}{'att'}{$gi}) { }
254650TFif defined $default
2558100TFunless $string =~ /^&([^;]*);$/
2560100TFif ($p->original_string =~ /^</ and $p->original_string =~ />$/) { }
2562100TFif $$t{'twig_do_not_escape_amp_in_atts'}
2566100TFif ($$t{'twig_keep_encoding'}) { }
2589100TFif ($$t{'twig_in_pcdata'}) { }
2606100TFif (my $prev_sibling = $$twig_current{'last_child'}) { }
261150TFif $twig_current
261250TFif $twig_current
2628100TFunless $$t{'twig_xmldecl'} or $$t{'output_encoding'}
2631100TFif ($decl) { }
2638100TFif ($$t{'output_encoding'}) { }
100TFelsif ($$decl{'encoding'}) { }
2647100TFif (defined $$decl{'standalone'})
2649100TF$$decl{'standalone'} ? :
2661100TF$output_filter ? :
2666100TFunless defined $$t{'twig_doctype'}
266850TFif defined $name
2669100TFif defined $system
2670100TFif defined $public
2671100TFif defined $internal
2676100TFunless my $doctype = $$t{'twig_doctype'}
2682100TFunless my $doctype = $$t{'twig_doctype'}
2688100TFunless my $doctype = $$t{'twig_doctype'}
2694100TFunless my $doctype = $$t{'twig_doctype'}
2708100TFif $elt
273550TF_is_fh($_[0]) ? :
2742100TFif ($$t{'no_prolog'})
2744100TFdefined $$t{'no_dtd_output'} ? :
50TF$$t{'no_prolog'} ? :
2757100TFif ($doctype)
275850TFif $$doctype{'name'}
2759100TFif $$doctype{'pub'}
2760100TFif $$doctype{'sysid'} and not $$doctype{'pub'}
2761100TFif $$doctype{'sysid'}
2764100TFif ($update_dtd) { }
100TFelsif ($doctype) { }
2765100TFif ($doctype) { }
50TFelsif (not $$t{'twig_dtd'} and keys %{$t->entity_list;}) { }
2768100TFif ($internal)
277350TFif $t->entity_list
2774100TFif ($internal)
2784100TFif (my $internal = $$doctype{'internal'})
2796100TFif ($doctype_text) { }
280350TF$output_filter ? :
2828100TFunless open TWIG_PRINT_TO_FILE, ">$filename"
2836100TF_is_fh($_[0]) ? :
2839100TFif ($fh) { }
284850TFif $$t{'twig_tdh'}
2850100TFif $$t{'twig_completely_flushed'}
2852100TF_is_fh($_[0]) ? :
2853100TFdefined $fh ? :
2854100TFref $_[0] ? :
2858100TFif (defined $args{'PrettyPrint'})
2864100TFif ($args{'EmptyTags'})
2873100TFif ($up_to) { }
100TFelsif ($$t{'twig_current'}) { }
2885100TFunless ($elt->_flushed)
2887100TFif ($$t{'twig_autoflush'})
2889100TFif $fh
2890100TFif @_
2898100TFif ($last_elt and $last_elt->in($elt)) { }
2900100TFunless ($elt->_flushed)
2912100TFif $last_elt and $elt == $last_elt
2917100TFif ($flush_trailing_data)
2922100TFif defined $old_select
2923100TFif defined $old_pretty
2924100TFif defined $old_empty_tag_style
2935100TFif (_is_fh($_[0])) { }
2952100TFif (defined $args{'PrettyPrint'})
2958100TFif (defined $args{'EmptyTags'})
2970100TFif defined $old_pretty
2971100TFif defined $old_empty_tag_style
298550TFif $$t{'twig_tdh'}
2989100TFif ($up_to) { }
100TFelsif ($$t{'twig_current'}) { }
3000100TFif ($last_elt and $last_elt->in($elt)) { }
3008100TFif $last_elt and $elt == $last_elt
303250TFif $] < 5.006
3035100TFref $twig_or_class ? :
3040100TFif $elt_class->can($att) and not $accessor{$att}
3043100TFif (not $accessor{$att})
3047100TFif (@_)
3062100TFif $root->passes($cond)
3074100TFif $t->root->matches($cond)
3080100TFif (isa($_[0], 'ARRAY')) { }
3093100TFunless @unique and $unique[-1] == $current
3099100TFif (isa($_[0], 'ARRAY')) { }
3115100TFdefined $index ? :
3123100TFif (not $cond && !$root->passes($cond)) { }
3142100TFif ($root->passes($cond)) { }
3172100TFunless $index = $XML::Twig::gi2index{$old_gi}
318350TFunless my $doctype = $$t{'twig_doctype'}
3190100TFif ($$dtd{'att'}{$gi})
3195100TFif ($$attlist{$att}{'fixed'}) { }
320450TFif $t->entity_list
3212100TF_is_fh($_[0]) ? :
3213100TFif ($fh) { }
3229100TFunless $$t{'twig_parsing'}
323750TFif ($$t{'twig_map_xmlns'}) { }
3252100TFif (not defined $fh) { }
50TFelsif (defined $fh) { }
325650TFif $old_fh
3260100TFif ($$t{'twig_keep_encoding'}) { }
3277100TFif (not $input_filter or isa($input_filter, 'CODE')) { }
50TFelsif ($input_filter eq 'latin1') { }
50TFelsif ($filter{$input_filter}) { }
333450TFif ($$t{'twig_root'} and isa($$t{'twig_root'}, 'XML::Twig'))
3339100TFif $$t{'twig_root'}
335950TFif ($string eq '<!DOCTYPE') { }
337650TFif ($$p{'twig'}{'expat_1_95_2'} and $p->recognized_string eq '[' and not $$p{'twig'}{'expat_1_95_2_seen_bracket'}) { }
340150TFif ($string eq '<!DOCTYPE') { }
342250TFif ($name)
342650TFif $name
342750TFif $pubid
3428100TFif $sysid and not $pubid
3429100TFif $sysid
3430100TFif $internal and not $$p{'twig'}{'expat_1_95_2'}
3431100TFunless $internal or $$p{'twig'}{'expat_1_95_2'}
344150TFif ($name)
344550TFif $name
344650TFif $pubid
3447100TFif $sysid and not $pubid
3448100TFif $sysid
3449100TFif $internal
3450100TFunless $internal or $$p{'twig'}{'expat_1_95_2'}
3477100TF$$t{'twig_keep_encoding'} ? :
100TF$$t{'twig_default_print'} ? :
3482100TFunless ($p->depth == 0)
3483100TFif ($$t{'twig_map_xmlns'})
3488100TFif (_handler($t, $$t{'twig_roots'}, $gi, \%att)) { }
100TFelsif ($p->depth == 0) { }
100TFelsif ($$t{'twig_starttag_handlers'}) { }
3496100TFif $tag
350850TFunless $last_handler_res
3511100TFif $tag and !@handlers || $last_handler_res
3515100TFif $tag
3525100TF$$t{'twig_keep_encoding'} ? :
100TF$$t{'twig_default_print'} ? :
3530100TFif ($$t{'twig_endtag_handlers'})
353650TFif (not $last_handler_res)
3543100TFif defined $tag
3545100TFif ($p->depth == 0)
355450TF$$t{'twig_keep_encoding'} ? :
100TF$$t{'twig_default_print'} ? :
3559100TFif (my $handler = $$t{'twig_handlers'}{'pi_handlers'}{$target} || $$t{'twig_handlers'}{'pi_handlers'}{''}) { }
357150TFif defined $pi
358350TFif ($action eq 'print')
359650TFif ($action eq 'print')
3603100TFif (not $$t{'twig_ignore_level'})
3617100TFif ($$t{'twig_endtag_handlers'})
3634100TFif (not $elt && isa($elt, 'XML::Twig::Elt'))
3640100TFunless ($elt == $current or $$current{'last_child'} and $elt == $$current{'last_child'} or $current->in($elt))
3643100TF$current == $elt ? :
365250TFif ($action eq 'print')
3667100TFif ($$elt_in_stack{'_elt'} and $elt == $$elt_in_stack{'_elt'})
3678100TFif ($output_fh and not $$t{'twig_output_fh_selected'})
3690100TFunless $$t{'twig_output_fh'}
369950TFif $_[0]{'twig_xmldecl'}
370450TFunless $t->xml_version
3714100TFif $encoding
371950TFif $_[0]{'twig_xmldecl'}
372850TFif $_[0]{'twig_xmldecl'}
373350TFunless $t->xml_version
3741100TFif defined $_[0]{'twig_parser'}
3747100TFif defined $_[0]{'twig_parser'}
3756100TFif (my $start_document = $handler->can('start_document'))
376150TFif $t->root
376250TFif (my $end_document = $handler->can('end_document'))
3784100TFif ($$t{'twig_current'}) { }
3790100TFunless ($elt->_flushed)
379250TFif (my $start_document = $handler->can('start_document'))
3800100TFif ($last_elt and $last_elt->in($elt)) { }
3802100TFunless ($elt->_flushed)
380450TFif (my $start_element = $handler->can('start_element'))
380550TFif (my $tag_data = &$start_tag_data($elt))
3817100TFif $last_elt and $elt == $last_elt
3821100TFif (not $$t{'twig_parsing'})
382250TFif (my $end_document = $handler->can('end_document'))
3841100TFif (my $xml_decl = $handler->can('xml_decl'))
3848100TFunless $doctype
385450TFif (my $start_dtd = $handler->can('start_dtd'))
385950TFif (my $end_dtd = $handler->can('end_dtd'))
386750TFif (_use('Encode')) { }
0TFelsif (_use('Text::Iconv')) { }
0TFelsif (_use('Unicode::Map8') and _use('Unicode::String')) { }
388150TFif (_use('Encode')) { }
0TFelsif (_use('Text::Iconv')) { }
0TFelsif (_use('Unicode::Map8') and _use('Unicode::String')) { }
390550TFunless _use('HTML::Entities')
391150TFif ($] < 5.008) { }
392350TFif ($] < 5.008) { }
394050TFif ($len == 2) { }
0TFelsif ($len == 3) { }
0TFelsif ($len == 4) { }
0TFelsif ($len == 1) { }
3958100TF$hex ? :
396450TF$_[1] ? :
396550TFunless _use('Unicode::Map8')
396650TFunless _use('Unicode::String')
396850TFunless $cnv = 'Unicode::Map8'->new($enc)
397650TFunless ($sub)
398150TF$_[1] ? :
398250TFunless _use('Text::Iconv')
398350TFunless $cnv = 'Text::Iconv'->new('utf8', $enc)
50TFunless $cnv = 'Text::Iconv'->new('utf8', $enc)
3991100TFunless ($sub)
399250TFif ($@ =~ /^Unsupported conversion: Invalid argument/) { }
400250TF$_[1] ? :
400450TFunless $sub
4012100TFwantarray ? :
402250TFif $t->root
4054100TFunless $ents_to_add and %$ents_to_add
4075100TFif (isa(ref $_[0], 'XML::Twig::Entity')) { }
409150TFdefined $fh ? :
409650TFif isa($ent, 'XML::Twig::Entity')
409850TFif defined $old_select
4133100TFif defined $val
4134100TFif defined $sysid
4135100TFif defined $pubid
4136100TFif defined $ndata
4137100TFif defined $param
4146100TFdefined $_[0]{'sysid'} ? :
414750TFdefined $_[0]{'pubid'} ? :
4148100TFdefined $_[0]{'ndata'} ? :
4149100TFdefined $_[0]{'param'} ? :
415550TFif (not defined $text)
415650TFif ($fh) { }
416350TFif (not defined $text)
4169100TFif not $$ent{'name'}
4173100TFif $$ent{'param'}
4176100TFif (defined $$ent{'val'} and not defined $$ent{'sysid'} and not defined $$ent{'pubid'}) { }
50TFelsif (defined $$ent{'sysid'}) { }
4180100TFif $$ent{'pubid'}
4181100TFunless $$ent{'pubid'}
4183100TFif $$ent{'ndata'}
418950TF$_[0] =~ /"/ ? :
428950TFif (eval 'require Scalar::Util' and defined &Scalar::Util::weaken) { }
0TFelsif (eval 'require WeakRef') { }
4308100TFunless @_
4315100TFref $_[0] eq 'HASH' ? :
4317100TFif ($atts and defined $$atts{'#CDATA'})
4324100TFif ($gi eq '#PCDATA') { }
100TFelsif ($gi eq '#ENT') { }
100TFelsif ($gi eq '#CDATA') { }
100TFelsif ($gi eq '#COMMENT') { }
100TFelsif ($gi eq '#PI') { }
4325100TFif (grep {ref $_;} @_)
4331100TFif (grep {ref $_;} @_)
4335100TFif (grep {ref $_;} @_)
4339100TFif (grep {ref $_;} @_)
4344100TFif (@_) { }
4350100TFif ($atts)
4352100TFif (defined $$atts{'#ASIS'})
4353100TFif (defined $$atts{'#EMPTY'})
4354100TFif keys %$atts
4355100TFif $$atts{$ID}
4368100TFif (ref $class)
4377100TFif ($$t{'twig_id_list'})
4394100TFif ($elt->tag eq 'head') { }
100TFelsif ($elt->tag ne 'html') { }
4411100TFunless (defined $XML::Twig::gi2index{$gi})
4435100TFif ($qname =~ /^([^:]*):/) { }
4456100TFdefined $_[0] ? :
4457100TF$prefix ? :
44670TFif (my $prefix = $elt->ns_prefix)
44690TFif (not $missing_prefix{$prefix} and not $elt->namespace)
44740TFif (not $root->_inherits_declared_prefix($prefix))
44850TFif ($elt->_declares_prefix($prefix)) { }
44950TFif $att eq "xmlns:$prefix"
45010TF$prefix ? :
45090TFif ($elt->_ns_prefix and $elt->namespace eq $uri)
4524100TFif $gi_nb >= $XML::Twig::SPECIAL_GI
4530100TFif $_[0]{'gi'} >= $XML::Twig::SPECIAL_GI
457050TFdefined $_[1] ? :
457350TFif $_[0]{'empty'} or 0
4581100TFif (exists $$descendant{'cdata'})
459350TFif $$descendant{'asis'}
4604100TFunless $curr_elt
4611100TFif ($elt->_extra_data_in_pcdata)
4630100TFif ($$elt{'extra_data_before_end_tag'}) { }
4646100TFif ((my $offset = index($modified, $initial)) != -1) { }
100TFelsif (($offset = index($initial, $modified)) != -1) { }
4654100TFif $$_{'offset'} >= 0
4657100TFunless _match_extra_data_words($elt, $initial, $modified) or _match_extra_data_chars($elt, $initial, $modified)
4684100TFif (@$initial <= @$modified) { }
4687100TFif ($ok)
4702100TFif ($ok)
471650TFif ($$cpi{'offset'} < $prev_pos)
4733100TFif ($s_word ne $l_word)
4738100TFif (not @$long and $s_word ne $l_word)
478450TFunless ($$elt{'gi'} == $XML::Twig::gi2index{'#PI'})
479950TFif (defined $data and $data ne '')
4806100TFunless ($$elt{'gi'} == $XML::Twig::gi2index{'#COMMENT'})
4823100TFunless ($$elt{'gi'} == $XML::Twig::gi2index{'#CDATA'})
4847100TFunless $elt->is_elt
4849100TFif $child->is_elt
4857100TFunless $child->is($exp)
4863100TFunless my $child = $$elt{'first_child'}
4864100TFunless $child->matches($exp)
4865100TFif $$child{'next_sibling'}
4920100TF$cond =~ s/^\s*!// ? :
4922100TFif (ref $cond eq 'CODE')
4924100TFif (ref $cond eq 'Regexp') { }
4928100TFif ($cond eq '#ELT') { }
100TFelsif ($cond eq '#TEXT') { }
100TFelsif ($cond =~ /^\s*($REG_NAME_W)\s*$/o) { }
100TFelsif ($cond =~ /^\s*($REG_REGEXP)\s*$/o) { }
100TFelsif ($cond =~ /^\s*($REG_NAME_W)?\s* # $1 \[\s*(-?)\s*(\d+)\s*\] # [$2] \s*$/ox) { }
100TFelsif ($cond =~ /^\s*\.([\w-]+)\s*$/o) { }
100TFelsif ($cond =~ /^\s*($REG_NAME_W?)\s*($REG_PREDICATE)\s*$/) { }
100TFelsif ($cond =~ /^\s*($REG_NAKED_PREDICATE)\s*$/) { }
4934100TFif ($1 ne '*') { }
4938100TFif ($gi) { }
4960100TF$neg ? :
4961100TFif ($gi and $gi ne '*') { }
4973100TF$tag && $tag ne '*' ? :
4987100TFif ($@)
5001100TFif (defined $string) { }
100TFelsif ($att) { }
100TFelsif ($bare_att) { }
50TFelsif ($num_test and $num_test eq '=') { }
100TFelsif ($alpha_test) { }
100TFelsif ($func and $func =~ /^(?:string|text)/) { }
100TFelsif ($string_regexp and $string_regexp =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*($REG_MATCH)\s*($REG_REGEXP)/) { }
100TFelsif ($string_eq and $string_eq =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*(!?=)\s*($REG_VALUE)/) { }
50TFelsif ($string_test and $string_test =~ /(?:string|text)\(\s*($REG_NAME)\s*\)\s*([<>]=?)\s*($REG_VALUE)/) { }
100TFelsif ($and_or) { }
5010100TF$and_or eq 'and' ? :
5037100TFif ($op eq '=') { }
100TFelsif ($op eq '!=') { }
5044100TFunless $cond
5053100TFif $XML::Twig::weakrefs
5096100TFif ($child) { }
5099100TFif ($cond =~ /^\s*($REG_NAME)/) { }
5112100TFif $XML::Twig::weakrefs
5130100TFif $XML::Twig::weakrefs
5165100TFunless $new_class
516750TF$class ? :
5183100TFunless $elt->tag eq 'span' and $elt->class
5189100TFunless $elt->tag eq 'div' and $elt->class
519650TFunless defined $elt_class
5197100TF$elt->class =~ /(?:^|\s)\Q$class\E(?:\s|$)/ ? :
5208100TFif keep_atts_order()
5209100TFisa($_[0] || '', 'HASH') ? :
5211100TFif (exists $atts{$ID})
5223100TFunless ($$elt{'att'})
5225100TFif keep_atts_order()
5231100TFif ($att eq $ID)
5253100TFunless defined $value
5266100TFif exists $$elt{'att'}{$ID}
5277100TFif $XML::Twig::weakrefs
5293100TFif (defined $$elt{'att'}{$ID}) { }
529650TF$_[0] && isa($_[0], 'CODE') ? :
530550TFunless (exists $$elt{'att'})
5306100TFunless (exists $$elt{'att'}{$ID})
5312100TFunless ($t)
531350TFif (exists $$t{'twig_id_list'}{$id})
5360100TFif $child->passes($cond)
5369100TFwantarray ? :
5376100TFwantarray ? :
5383100TFunless $child->passes($cond)
5393100TFif $elt->passes($cond)
5402100TFif $elt->passes($cond)
5411100TF$include_self ? :
5423100TFif (defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]})
5437100TFif (defined $$elt{'att'}{$att} and !%tags || $tags{$XML::Twig::index2gi[$$elt{'gi'}]})
5449100TFif $elt->namespace('')
5471100TFif defined $_[0] and isa($_[0], 'XML::Twig::Elt')
5477100TFif ($cond)
5478100TFunless (defined($ind = $XML::Twig::gi2index{$cond}))
5483100TFif ($next_elt = $$elt{'first_child'}) { }
100TFelsif ($next_elt = $$elt{'next_sibling'}) { }
5490100TFif $subtree_root and $elt == $subtree_root
5498100TFif $subtree_root and $elt == $subtree_root
5503100TFif $subtree_root and $subtree_root == $next_elt
5506100TFif $subtree_root and $subtree_root == $next_elt
5527100TFif (not $cond or $last_descendant->matches($cond)) { }
5548100TFif (defined $_[0] and isa($_[0], 'XML::Twig::Elt'))
5550100TFif $elt == $subtree_root
5556100TFif $elt == $subtree_root
5557100TFif ($prev_elt = $$elt{'prev_sibling'}) { }
5573100TF$elt ? :
5579100TFif not $cond or $elt->matches($cond)
5585100TFif (not $cond)
5587100TFif ($following) { }
5601100TF$elt ? :
5607100TFif not $cond or $elt->matches($cond)
5613100TFif (not $cond)
5615100TFif ($preceding) { }
5628100TF$cond ? :
5642100TFif (isa($ancestor, 'XML::Twig::Elt')) { }
5644100TFif $elt == $ancestor
5648100TFif $elt->matches($ancestor)
5655100TFunless my $dest = $elt->first_child(@_)
5666100TFunless my $dest = $elt->first_child(@_)
5672100TFunless my $dest = $$elt{'first_child'}
5678100TFunless my $dest = $elt->last_child(@_)
5684100TFunless my $dest = $elt->last_child(@_)
5690100TFunless my $dest = $$elt{'last_child'}
5696100TFunless my $dest = $elt->child(@_)
5702100TFunless my $dest = $elt->child(@_)
5709100TFunless my $dest = $elt->child($nb)
5715100TFunless my $dest = $elt->_prev_sibling(@_)
5721100TFunless my $dest = $elt->_prev_sibling(@_)
5727100TFunless my $dest = $$elt{'prev_sibling'}
5733100TFunless my $dest = $elt->next_sibling(@_)
5739100TFunless my $dest = $elt->next_sibling(@_)
5745100TFunless my $dest = $$elt{'next_sibling'}
5751100TFunless my $dest = $elt->prev_elt(@_)
5757100TFunless my $dest = $elt->prev_elt(@_)
5763100TFunless my $dest = $elt->prev_elt
5769100TFunless my $dest = $elt->next_elt(@_)
5775100TFunless my $dest = $elt->next_elt(@_)
5781100TFunless my $dest = $elt->next_elt
5787100TFunless my $dest = $elt->parent(@_)
5793100TFunless my $dest = $elt->parent(@_)