← Index
NYTProf Performance Profile   « line view »
For webmerge/scripts/webmerge.pl
  Run on Mon Oct 7 02:42:42 2013
Reported on Mon Oct 7 03:03:29 2013

Filename/usr/lib64/perl5/vendor_perl/5.16.0/XML/SAX/Base.pm
StatementsExecuted 2012 statements in 185ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2911137.9ms51.2msXML::SAX::Base::::characters XML::SAX::Base::characters
289116.14ms13.2msXML::SAX::Base::::__ANON__[:207] XML::SAX::Base::__ANON__[:207]
132113.43ms13.2msXML::SAX::Base::::start_element XML::SAX::Base::start_element
132113.32ms7.75msXML::SAX::Base::::end_element XML::SAX::Base::end_element
130112.86ms9.69msXML::SAX::Base::::__ANON__[:299] XML::SAX::Base::__ANON__[:299]
130112.83ms4.38msXML::SAX::Base::::__ANON__[:2208] XML::SAX::Base::__ANON__[:2208]
60111.74ms2.18msXML::SAX::Base::::comment XML::SAX::Base::comment
5811400µs400µsXML::SAX::Base::::__ANON__[:2427] XML::SAX::Base::__ANON__[:2427]
211300µs382µsXML::SAX::Base::::set_feature XML::SAX::Base::set_feature
211249µs135msXML::SAX::Base::::parse_string XML::SAX::Base::parse_string
211234µs316µsXML::SAX::Base::::start_document XML::SAX::Base::start_document
211205µs290µsXML::SAX::Base::::end_document XML::SAX::Base::end_document
211200µs134msXML::SAX::Base::::parse XML::SAX::Base::parse
211156µs199µsXML::SAX::Base::::xml_decl XML::SAX::Base::xml_decl
211152µs693µsXML::SAX::Base::::new XML::SAX::Base::new
42198µs98µsXML::SAX::Base::::get_options XML::SAX::Base::get_options
11161µs61µsXML::SAX::Base::::BEGIN@2 XML::SAX::Base::BEGIN@2
21154µs54µsXML::SAX::Base::::get_features XML::SAX::Base::get_features
11153µs148µsXML::SAX::Base::::BEGIN@37 XML::SAX::Base::BEGIN@37
11134µs34µsXML::SAX::Base::NoHandler::::BEGIN@2872XML::SAX::Base::NoHandler::BEGIN@2872
21128µs28µsXML::SAX::Base::::supported_features XML::SAX::Base::supported_features
11124µs24µsXML::SAX::Base::::BEGIN@39 XML::SAX::Base::BEGIN@39
0000s0sXML::SAX::Base::NoHandler::::newXML::SAX::Base::NoHandler::new
0000s0sXML::SAX::Base::::__ANON__[:1001] XML::SAX::Base::__ANON__[:1001]
0000s0sXML::SAX::Base::::__ANON__[:1019] XML::SAX::Base::__ANON__[:1019]
0000s0sXML::SAX::Base::::__ANON__[:1024] XML::SAX::Base::__ANON__[:1024]
0000s0sXML::SAX::Base::::__ANON__[:1048] XML::SAX::Base::__ANON__[:1048]
0000s0sXML::SAX::Base::::__ANON__[:104] XML::SAX::Base::__ANON__[:104]
0000s0sXML::SAX::Base::::__ANON__[:1053] XML::SAX::Base::__ANON__[:1053]
0000s0sXML::SAX::Base::::__ANON__[:1070] XML::SAX::Base::__ANON__[:1070]
0000s0sXML::SAX::Base::::__ANON__[:1088] XML::SAX::Base::__ANON__[:1088]
0000s0sXML::SAX::Base::::__ANON__[:1093] XML::SAX::Base::__ANON__[:1093]
0000s0sXML::SAX::Base::::__ANON__[:1117] XML::SAX::Base::__ANON__[:1117]
0000s0sXML::SAX::Base::::__ANON__[:1122] XML::SAX::Base::__ANON__[:1122]
0000s0sXML::SAX::Base::::__ANON__[:1139] XML::SAX::Base::__ANON__[:1139]
0000s0sXML::SAX::Base::::__ANON__[:1157] XML::SAX::Base::__ANON__[:1157]
0000s0sXML::SAX::Base::::__ANON__[:1162] XML::SAX::Base::__ANON__[:1162]
0000s0sXML::SAX::Base::::__ANON__[:1186] XML::SAX::Base::__ANON__[:1186]
0000s0sXML::SAX::Base::::__ANON__[:1191] XML::SAX::Base::__ANON__[:1191]
0000s0sXML::SAX::Base::::__ANON__[:1208] XML::SAX::Base::__ANON__[:1208]
0000s0sXML::SAX::Base::::__ANON__[:1226] XML::SAX::Base::__ANON__[:1226]
0000s0sXML::SAX::Base::::__ANON__[:1231] XML::SAX::Base::__ANON__[:1231]
0000s0sXML::SAX::Base::::__ANON__[:1255] XML::SAX::Base::__ANON__[:1255]
0000s0sXML::SAX::Base::::__ANON__[:1260] XML::SAX::Base::__ANON__[:1260]
0000s0sXML::SAX::Base::::__ANON__[:1265] XML::SAX::Base::__ANON__[:1265]
0000s0sXML::SAX::Base::::__ANON__[:1282] XML::SAX::Base::__ANON__[:1282]
0000s0sXML::SAX::Base::::__ANON__[:128] XML::SAX::Base::__ANON__[:128]
0000s0sXML::SAX::Base::::__ANON__[:1300] XML::SAX::Base::__ANON__[:1300]
0000s0sXML::SAX::Base::::__ANON__[:1318] XML::SAX::Base::__ANON__[:1318]
0000s0sXML::SAX::Base::::__ANON__[:1323] XML::SAX::Base::__ANON__[:1323]
0000s0sXML::SAX::Base::::__ANON__[:133] XML::SAX::Base::__ANON__[:133]
0000s0sXML::SAX::Base::::__ANON__[:1347] XML::SAX::Base::__ANON__[:1347]
0000s0sXML::SAX::Base::::__ANON__[:1352] XML::SAX::Base::__ANON__[:1352]
0000s0sXML::SAX::Base::::__ANON__[:1357] XML::SAX::Base::__ANON__[:1357]
0000s0sXML::SAX::Base::::__ANON__[:1374] XML::SAX::Base::__ANON__[:1374]
0000s0sXML::SAX::Base::::__ANON__[:1392] XML::SAX::Base::__ANON__[:1392]
0000s0sXML::SAX::Base::::__ANON__[:1410] XML::SAX::Base::__ANON__[:1410]
0000s0sXML::SAX::Base::::__ANON__[:1415] XML::SAX::Base::__ANON__[:1415]
0000s0sXML::SAX::Base::::__ANON__[:1439] XML::SAX::Base::__ANON__[:1439]
0000s0sXML::SAX::Base::::__ANON__[:1444] XML::SAX::Base::__ANON__[:1444]
0000s0sXML::SAX::Base::::__ANON__[:1449] XML::SAX::Base::__ANON__[:1449]
0000s0sXML::SAX::Base::::__ANON__[:1466] XML::SAX::Base::__ANON__[:1466]
0000s0sXML::SAX::Base::::__ANON__[:1484] XML::SAX::Base::__ANON__[:1484]
0000s0sXML::SAX::Base::::__ANON__[:1502] XML::SAX::Base::__ANON__[:1502]
0000s0sXML::SAX::Base::::__ANON__[:1507] XML::SAX::Base::__ANON__[:1507]
0000s0sXML::SAX::Base::::__ANON__[:150] XML::SAX::Base::__ANON__[:150]
0000s0sXML::SAX::Base::::__ANON__[:1531] XML::SAX::Base::__ANON__[:1531]
0000s0sXML::SAX::Base::::__ANON__[:1536] XML::SAX::Base::__ANON__[:1536]
0000s0sXML::SAX::Base::::__ANON__[:1541] XML::SAX::Base::__ANON__[:1541]
0000s0sXML::SAX::Base::::__ANON__[:1558] XML::SAX::Base::__ANON__[:1558]
0000s0sXML::SAX::Base::::__ANON__[:1576] XML::SAX::Base::__ANON__[:1576]
0000s0sXML::SAX::Base::::__ANON__[:1594] XML::SAX::Base::__ANON__[:1594]
0000s0sXML::SAX::Base::::__ANON__[:1599] XML::SAX::Base::__ANON__[:1599]
0000s0sXML::SAX::Base::::__ANON__[:1623] XML::SAX::Base::__ANON__[:1623]
0000s0sXML::SAX::Base::::__ANON__[:1628] XML::SAX::Base::__ANON__[:1628]
0000s0sXML::SAX::Base::::__ANON__[:1633] XML::SAX::Base::__ANON__[:1633]
0000s0sXML::SAX::Base::::__ANON__[:1650] XML::SAX::Base::__ANON__[:1650]
0000s0sXML::SAX::Base::::__ANON__[:1668] XML::SAX::Base::__ANON__[:1668]
0000s0sXML::SAX::Base::::__ANON__[:1686] XML::SAX::Base::__ANON__[:1686]
0000s0sXML::SAX::Base::::__ANON__[:168] XML::SAX::Base::__ANON__[:168]
0000s0sXML::SAX::Base::::__ANON__[:1691] XML::SAX::Base::__ANON__[:1691]
0000s0sXML::SAX::Base::::__ANON__[:1715] XML::SAX::Base::__ANON__[:1715]
0000s0sXML::SAX::Base::::__ANON__[:1720] XML::SAX::Base::__ANON__[:1720]
0000s0sXML::SAX::Base::::__ANON__[:1737] XML::SAX::Base::__ANON__[:1737]
0000s0sXML::SAX::Base::::__ANON__[:173] XML::SAX::Base::__ANON__[:173]
0000s0sXML::SAX::Base::::__ANON__[:1755] XML::SAX::Base::__ANON__[:1755]
0000s0sXML::SAX::Base::::__ANON__[:1760] XML::SAX::Base::__ANON__[:1760]
0000s0sXML::SAX::Base::::__ANON__[:1784] XML::SAX::Base::__ANON__[:1784]
0000s0sXML::SAX::Base::::__ANON__[:1789] XML::SAX::Base::__ANON__[:1789]
0000s0sXML::SAX::Base::::__ANON__[:1806] XML::SAX::Base::__ANON__[:1806]
0000s0sXML::SAX::Base::::__ANON__[:1824] XML::SAX::Base::__ANON__[:1824]
0000s0sXML::SAX::Base::::__ANON__[:1829] XML::SAX::Base::__ANON__[:1829]
0000s0sXML::SAX::Base::::__ANON__[:1853] XML::SAX::Base::__ANON__[:1853]
0000s0sXML::SAX::Base::::__ANON__[:1858] XML::SAX::Base::__ANON__[:1858]
0000s0sXML::SAX::Base::::__ANON__[:1875] XML::SAX::Base::__ANON__[:1875]
0000s0sXML::SAX::Base::::__ANON__[:1893] XML::SAX::Base::__ANON__[:1893]
0000s0sXML::SAX::Base::::__ANON__[:1898] XML::SAX::Base::__ANON__[:1898]
0000s0sXML::SAX::Base::::__ANON__[:1922] XML::SAX::Base::__ANON__[:1922]
0000s0sXML::SAX::Base::::__ANON__[:1927] XML::SAX::Base::__ANON__[:1927]
0000s0sXML::SAX::Base::::__ANON__[:1944] XML::SAX::Base::__ANON__[:1944]
0000s0sXML::SAX::Base::::__ANON__[:1962] XML::SAX::Base::__ANON__[:1962]
0000s0sXML::SAX::Base::::__ANON__[:1967] XML::SAX::Base::__ANON__[:1967]
0000s0sXML::SAX::Base::::__ANON__[:197] XML::SAX::Base::__ANON__[:197]
0000s0sXML::SAX::Base::::__ANON__[:1991] XML::SAX::Base::__ANON__[:1991]
0000s0sXML::SAX::Base::::__ANON__[:1996] XML::SAX::Base::__ANON__[:1996]
0000s0sXML::SAX::Base::::__ANON__[:2013] XML::SAX::Base::__ANON__[:2013]
0000s0sXML::SAX::Base::::__ANON__[:202] XML::SAX::Base::__ANON__[:202]
0000s0sXML::SAX::Base::::__ANON__[:2031] XML::SAX::Base::__ANON__[:2031]
0000s0sXML::SAX::Base::::__ANON__[:2036] XML::SAX::Base::__ANON__[:2036]
0000s0sXML::SAX::Base::::__ANON__[:2060] XML::SAX::Base::__ANON__[:2060]
0000s0sXML::SAX::Base::::__ANON__[:2065] XML::SAX::Base::__ANON__[:2065]
0000s0sXML::SAX::Base::::__ANON__[:2082] XML::SAX::Base::__ANON__[:2082]
0000s0sXML::SAX::Base::::__ANON__[:2100] XML::SAX::Base::__ANON__[:2100]
0000s0sXML::SAX::Base::::__ANON__[:2105] XML::SAX::Base::__ANON__[:2105]
0000s0sXML::SAX::Base::::__ANON__[:2129] XML::SAX::Base::__ANON__[:2129]
0000s0sXML::SAX::Base::::__ANON__[:2134] XML::SAX::Base::__ANON__[:2134]
0000s0sXML::SAX::Base::::__ANON__[:2151] XML::SAX::Base::__ANON__[:2151]
0000s0sXML::SAX::Base::::__ANON__[:2169] XML::SAX::Base::__ANON__[:2169]
0000s0sXML::SAX::Base::::__ANON__[:2174] XML::SAX::Base::__ANON__[:2174]
0000s0sXML::SAX::Base::::__ANON__[:2198] XML::SAX::Base::__ANON__[:2198]
0000s0sXML::SAX::Base::::__ANON__[:2203] XML::SAX::Base::__ANON__[:2203]
0000s0sXML::SAX::Base::::__ANON__[:2225] XML::SAX::Base::__ANON__[:2225]
0000s0sXML::SAX::Base::::__ANON__[:2243] XML::SAX::Base::__ANON__[:2243]
0000s0sXML::SAX::Base::::__ANON__[:224] XML::SAX::Base::__ANON__[:224]
0000s0sXML::SAX::Base::::__ANON__[:2261] XML::SAX::Base::__ANON__[:2261]
0000s0sXML::SAX::Base::::__ANON__[:2266] XML::SAX::Base::__ANON__[:2266]
0000s0sXML::SAX::Base::::__ANON__[:2290] XML::SAX::Base::__ANON__[:2290]
0000s0sXML::SAX::Base::::__ANON__[:2295] XML::SAX::Base::__ANON__[:2295]
0000s0sXML::SAX::Base::::__ANON__[:2312] XML::SAX::Base::__ANON__[:2312]
0000s0sXML::SAX::Base::::__ANON__[:2330] XML::SAX::Base::__ANON__[:2330]
0000s0sXML::SAX::Base::::__ANON__[:2335] XML::SAX::Base::__ANON__[:2335]
0000s0sXML::SAX::Base::::__ANON__[:2359] XML::SAX::Base::__ANON__[:2359]
0000s0sXML::SAX::Base::::__ANON__[:2364] XML::SAX::Base::__ANON__[:2364]
0000s0sXML::SAX::Base::::__ANON__[:2369] XML::SAX::Base::__ANON__[:2369]
0000s0sXML::SAX::Base::::__ANON__[:2386] XML::SAX::Base::__ANON__[:2386]
0000s0sXML::SAX::Base::::__ANON__[:2404] XML::SAX::Base::__ANON__[:2404]
0000s0sXML::SAX::Base::::__ANON__[:2422] XML::SAX::Base::__ANON__[:2422]
0000s0sXML::SAX::Base::::__ANON__[:242] XML::SAX::Base::__ANON__[:242]
0000s0sXML::SAX::Base::::__ANON__[:2451] XML::SAX::Base::__ANON__[:2451]
0000s0sXML::SAX::Base::::__ANON__[:2456] XML::SAX::Base::__ANON__[:2456]
0000s0sXML::SAX::Base::::__ANON__[:2473] XML::SAX::Base::__ANON__[:2473]
0000s0sXML::SAX::Base::::__ANON__[:2491] XML::SAX::Base::__ANON__[:2491]
0000s0sXML::SAX::Base::::__ANON__[:2496] XML::SAX::Base::__ANON__[:2496]
0000s0sXML::SAX::Base::::__ANON__[:2520] XML::SAX::Base::__ANON__[:2520]
0000s0sXML::SAX::Base::::__ANON__[:2525] XML::SAX::Base::__ANON__[:2525]
0000s0sXML::SAX::Base::::__ANON__[:2542] XML::SAX::Base::__ANON__[:2542]
0000s0sXML::SAX::Base::::__ANON__[:2560] XML::SAX::Base::__ANON__[:2560]
0000s0sXML::SAX::Base::::__ANON__[:2565] XML::SAX::Base::__ANON__[:2565]
0000s0sXML::SAX::Base::::__ANON__[:260] XML::SAX::Base::__ANON__[:260]
0000s0sXML::SAX::Base::::__ANON__[:265] XML::SAX::Base::__ANON__[:265]
0000s0sXML::SAX::Base::::__ANON__[:289] XML::SAX::Base::__ANON__[:289]
0000s0sXML::SAX::Base::::__ANON__[:294] XML::SAX::Base::__ANON__[:294]
0000s0sXML::SAX::Base::::__ANON__[:316] XML::SAX::Base::__ANON__[:316]
0000s0sXML::SAX::Base::::__ANON__[:334] XML::SAX::Base::__ANON__[:334]
0000s0sXML::SAX::Base::::__ANON__[:352] XML::SAX::Base::__ANON__[:352]
0000s0sXML::SAX::Base::::__ANON__[:357] XML::SAX::Base::__ANON__[:357]
0000s0sXML::SAX::Base::::__ANON__[:381] XML::SAX::Base::__ANON__[:381]
0000s0sXML::SAX::Base::::__ANON__[:386] XML::SAX::Base::__ANON__[:386]
0000s0sXML::SAX::Base::::__ANON__[:403] XML::SAX::Base::__ANON__[:403]
0000s0sXML::SAX::Base::::__ANON__[:421] XML::SAX::Base::__ANON__[:421]
0000s0sXML::SAX::Base::::__ANON__[:426] XML::SAX::Base::__ANON__[:426]
0000s0sXML::SAX::Base::::__ANON__[:450] XML::SAX::Base::__ANON__[:450]
0000s0sXML::SAX::Base::::__ANON__[:455] XML::SAX::Base::__ANON__[:455]
0000s0sXML::SAX::Base::::__ANON__[:472] XML::SAX::Base::__ANON__[:472]
0000s0sXML::SAX::Base::::__ANON__[:490] XML::SAX::Base::__ANON__[:490]
0000s0sXML::SAX::Base::::__ANON__[:495] XML::SAX::Base::__ANON__[:495]
0000s0sXML::SAX::Base::::__ANON__[:519] XML::SAX::Base::__ANON__[:519]
0000s0sXML::SAX::Base::::__ANON__[:524] XML::SAX::Base::__ANON__[:524]
0000s0sXML::SAX::Base::::__ANON__[:541] XML::SAX::Base::__ANON__[:541]
0000s0sXML::SAX::Base::::__ANON__[:559] XML::SAX::Base::__ANON__[:559]
0000s0sXML::SAX::Base::::__ANON__[:564] XML::SAX::Base::__ANON__[:564]
0000s0sXML::SAX::Base::::__ANON__[:588] XML::SAX::Base::__ANON__[:588]
0000s0sXML::SAX::Base::::__ANON__[:593] XML::SAX::Base::__ANON__[:593]
0000s0sXML::SAX::Base::::__ANON__[:59] XML::SAX::Base::__ANON__[:59]
0000s0sXML::SAX::Base::::__ANON__[:610] XML::SAX::Base::__ANON__[:610]
0000s0sXML::SAX::Base::::__ANON__[:628] XML::SAX::Base::__ANON__[:628]
0000s0sXML::SAX::Base::::__ANON__[:633] XML::SAX::Base::__ANON__[:633]
0000s0sXML::SAX::Base::::__ANON__[:64] XML::SAX::Base::__ANON__[:64]
0000s0sXML::SAX::Base::::__ANON__[:657] XML::SAX::Base::__ANON__[:657]
0000s0sXML::SAX::Base::::__ANON__[:662] XML::SAX::Base::__ANON__[:662]
0000s0sXML::SAX::Base::::__ANON__[:679] XML::SAX::Base::__ANON__[:679]
0000s0sXML::SAX::Base::::__ANON__[:697] XML::SAX::Base::__ANON__[:697]
0000s0sXML::SAX::Base::::__ANON__[:702] XML::SAX::Base::__ANON__[:702]
0000s0sXML::SAX::Base::::__ANON__[:726] XML::SAX::Base::__ANON__[:726]
0000s0sXML::SAX::Base::::__ANON__[:731] XML::SAX::Base::__ANON__[:731]
0000s0sXML::SAX::Base::::__ANON__[:736] XML::SAX::Base::__ANON__[:736]
0000s0sXML::SAX::Base::::__ANON__[:753] XML::SAX::Base::__ANON__[:753]
0000s0sXML::SAX::Base::::__ANON__[:771] XML::SAX::Base::__ANON__[:771]
0000s0sXML::SAX::Base::::__ANON__[:789] XML::SAX::Base::__ANON__[:789]
0000s0sXML::SAX::Base::::__ANON__[:794] XML::SAX::Base::__ANON__[:794]
0000s0sXML::SAX::Base::::__ANON__[:818] XML::SAX::Base::__ANON__[:818]
0000s0sXML::SAX::Base::::__ANON__[:81] XML::SAX::Base::__ANON__[:81]
0000s0sXML::SAX::Base::::__ANON__[:823] XML::SAX::Base::__ANON__[:823]
0000s0sXML::SAX::Base::::__ANON__[:840] XML::SAX::Base::__ANON__[:840]
0000s0sXML::SAX::Base::::__ANON__[:858] XML::SAX::Base::__ANON__[:858]
0000s0sXML::SAX::Base::::__ANON__[:863] XML::SAX::Base::__ANON__[:863]
0000s0sXML::SAX::Base::::__ANON__[:887] XML::SAX::Base::__ANON__[:887]
0000s0sXML::SAX::Base::::__ANON__[:892] XML::SAX::Base::__ANON__[:892]
0000s0sXML::SAX::Base::::__ANON__[:909] XML::SAX::Base::__ANON__[:909]
0000s0sXML::SAX::Base::::__ANON__[:927] XML::SAX::Base::__ANON__[:927]
0000s0sXML::SAX::Base::::__ANON__[:932] XML::SAX::Base::__ANON__[:932]
0000s0sXML::SAX::Base::::__ANON__[:956] XML::SAX::Base::__ANON__[:956]
0000s0sXML::SAX::Base::::__ANON__[:961] XML::SAX::Base::__ANON__[:961]
0000s0sXML::SAX::Base::::__ANON__[:966] XML::SAX::Base::__ANON__[:966]
0000s0sXML::SAX::Base::::__ANON__[:983] XML::SAX::Base::__ANON__[:983]
0000s0sXML::SAX::Base::::__ANON__[:99] XML::SAX::Base::__ANON__[:99]
0000s0sXML::SAX::Base::::attlist_decl XML::SAX::Base::attlist_decl
0000s0sXML::SAX::Base::::attribute_decl XML::SAX::Base::attribute_decl
0000s0sXML::SAX::Base::::doctype_decl XML::SAX::Base::doctype_decl
0000s0sXML::SAX::Base::::element_decl XML::SAX::Base::element_decl
0000s0sXML::SAX::Base::::end_cdata XML::SAX::Base::end_cdata
0000s0sXML::SAX::Base::::end_dtd XML::SAX::Base::end_dtd
0000s0sXML::SAX::Base::::end_entity XML::SAX::Base::end_entity
0000s0sXML::SAX::Base::::end_prefix_mapping XML::SAX::Base::end_prefix_mapping
0000s0sXML::SAX::Base::::entity_decl XML::SAX::Base::entity_decl
0000s0sXML::SAX::Base::::entity_reference XML::SAX::Base::entity_reference
0000s0sXML::SAX::Base::::error XML::SAX::Base::error
0000s0sXML::SAX::Base::::external_entity_decl XML::SAX::Base::external_entity_decl
0000s0sXML::SAX::Base::::fatal_error XML::SAX::Base::fatal_error
0000s0sXML::SAX::Base::::get_content_handler XML::SAX::Base::get_content_handler
0000s0sXML::SAX::Base::::get_decl_handler XML::SAX::Base::get_decl_handler
0000s0sXML::SAX::Base::::get_document_handler XML::SAX::Base::get_document_handler
0000s0sXML::SAX::Base::::get_dtd_handler XML::SAX::Base::get_dtd_handler
0000s0sXML::SAX::Base::::get_entity_resolver XML::SAX::Base::get_entity_resolver
0000s0sXML::SAX::Base::::get_error_handler XML::SAX::Base::get_error_handler
0000s0sXML::SAX::Base::::get_feature XML::SAX::Base::get_feature
0000s0sXML::SAX::Base::::get_handler XML::SAX::Base::get_handler
0000s0sXML::SAX::Base::::get_lexical_handler XML::SAX::Base::get_lexical_handler
0000s0sXML::SAX::Base::::ignorable_whitespace XML::SAX::Base::ignorable_whitespace
0000s0sXML::SAX::Base::::internal_entity_decl XML::SAX::Base::internal_entity_decl
0000s0sXML::SAX::Base::::no_op XML::SAX::Base::no_op
0000s0sXML::SAX::Base::::notation_decl XML::SAX::Base::notation_decl
0000s0sXML::SAX::Base::::parse_file XML::SAX::Base::parse_file
0000s0sXML::SAX::Base::::parse_uri XML::SAX::Base::parse_uri
0000s0sXML::SAX::Base::::processing_instruction XML::SAX::Base::processing_instruction
0000s0sXML::SAX::Base::::resolve_entity XML::SAX::Base::resolve_entity
0000s0sXML::SAX::Base::::set_content_handler XML::SAX::Base::set_content_handler
0000s0sXML::SAX::Base::::set_decl_handler XML::SAX::Base::set_decl_handler
0000s0sXML::SAX::Base::::set_document_handler XML::SAX::Base::set_document_handler
0000s0sXML::SAX::Base::::set_document_locator XML::SAX::Base::set_document_locator
0000s0sXML::SAX::Base::::set_dtd_handler XML::SAX::Base::set_dtd_handler
0000s0sXML::SAX::Base::::set_entity_resolver XML::SAX::Base::set_entity_resolver
0000s0sXML::SAX::Base::::set_error_handler XML::SAX::Base::set_error_handler
0000s0sXML::SAX::Base::::set_handler XML::SAX::Base::set_handler
0000s0sXML::SAX::Base::::set_lexical_handler XML::SAX::Base::set_lexical_handler
0000s0sXML::SAX::Base::::skipped_entity XML::SAX::Base::skipped_entity
0000s0sXML::SAX::Base::::start_cdata XML::SAX::Base::start_cdata
0000s0sXML::SAX::Base::::start_dtd XML::SAX::Base::start_dtd
0000s0sXML::SAX::Base::::start_entity XML::SAX::Base::start_entity
0000s0sXML::SAX::Base::::start_prefix_mapping XML::SAX::Base::start_prefix_mapping
0000s0sXML::SAX::Base::::unparsed_entity_decl XML::SAX::Base::unparsed_entity_decl
0000s0sXML::SAX::Base::::warning XML::SAX::Base::warning
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package XML::SAX::Base;
2
# spent 61µs within XML::SAX::Base::BEGIN@2 which was called: # once (61µs+0s) by XML::LibXML::SAX::BEGIN@18 at line 4
BEGIN {
3138µs $XML::SAX::Base::VERSION = '1.08';
41198µs161µs}
# spent 61µs making 1 call to XML::SAX::Base::BEGIN@2
5
6# version 0.10 - Kip Hampton <khampton@totalcinema.com>
7# version 0.13 - Robin Berjon <robin@knowscape.com>
8# version 0.15 - Kip Hampton <khampton@totalcinema.com>
9# version 0.17 - Kip Hampton <khampton@totalcinema.com>
10# version 0.19 - Kip Hampton <khampton@totalcinema.com>
11# version 0.21 - Kip Hampton <khampton@totalcinema.com>
12# version 0.22 - Robin Berjon <robin@knowscape.com>
13# version 0.23 - Matt Sergeant <matt@sergeant.org>
14# version 0.24 - Robin Berjon <robin@knowscape.com>
15# version 0.25 - Kip Hampton <khampton@totalcinema.com>
16# version 1.00 - Kip Hampton <khampton@totalcinema.com>
17# version 1.01 - Kip Hampton <khampton@totalcinema.com>
18# version 1.02 - Robin Berjon <robin@knowscape.com>
19# version 1.03 - Matt Sergeant <matt@sergeant.org>
20# version 1.04 - Kip Hampton <khampton@totalcinema.com>
21# version 1.05 - Grant McLean <grantm@cpan.org>
22# version 1.06 - Grant McLean <grantm@cpan.org>
23# version 1.07 - Grant McLean <grantm@cpan.org>
24# version 1.08 - Grant McLean <grantm@cpan.org>
25
26#-----------------------------------------------------#
27# STOP!!!!!
28#
29# This file is generated by the 'BuildSAXBase.pl' file
30# that ships with the XML::SAX::Base distribution.
31# If you need to make changes, patch that file NOT
32# XML/SAX/Base.pm Better yet, fork the git repository
33# commit your changes and send a pull request:
34# https://github.com/grantm/XML-SAX-Base
35#-----------------------------------------------------#
36
372154µs2243µs
# spent 148µs (53+95) within XML::SAX::Base::BEGIN@37 which was called: # once (53µs+95µs) by XML::LibXML::SAX::BEGIN@18 at line 37
use strict;
# spent 148µs making 1 call to XML::SAX::Base::BEGIN@37 # spent 95µs making 1 call to strict::import
38
39295.5ms124µs
# spent 24µs within XML::SAX::Base::BEGIN@39 which was called: # once (24µs+0s) by XML::LibXML::SAX::BEGIN@18 at line 39
use XML::SAX::Exception qw();
# spent 24µs making 1 call to XML::SAX::Base::BEGIN@39
40
41sub end_prefix_mapping {
42 my $self = shift;
43 if (defined $self->{Methods}->{'end_prefix_mapping'}) {
44 $self->{Methods}->{'end_prefix_mapping'}->(@_);
45 }
46 else {
47 my $method;
48 my $callbacks;
49 if (exists $self->{ParseOptions}) {
50 $callbacks = $self->{ParseOptions};
51 }
52 else {
53 $callbacks = $self;
54 }
55 if (0) { # dummy to make elsif's below compile
56 }
57 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('end_prefix_mapping') ) {
58 my $handler = $callbacks->{'ContentHandler'};
59 $self->{Methods}->{'end_prefix_mapping'} = sub { $method->($handler, @_) };
60 return $method->($handler, @_);
61 }
62 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_prefix_mapping') ) {
63 my $handler = $callbacks->{'Handler'};
64 $self->{Methods}->{'end_prefix_mapping'} = sub { $method->($handler, @_) };
65 return $method->($handler, @_);
66 }
67 elsif (defined $callbacks->{'ContentHandler'}
68 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
69 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
70 )
71 {
72 my $res = eval { $callbacks->{'ContentHandler'}->end_prefix_mapping(@_) };
73 if ($@) {
74 die $@;
75 }
76 else {
77 # I think there's a buggette here...
78 # if the first call throws an exception, we don't set it up right.
79 # Not fatal, but we might want to address it.
80 my $handler = $callbacks->{'ContentHandler'};
81 $self->{Methods}->{'end_prefix_mapping'} = sub { $handler->end_prefix_mapping(@_) };
82 }
83 return $res;
84 }
85 elsif (defined $callbacks->{'Handler'}
86 and $callbacks->{'Handler'}->can('AUTOLOAD')
87 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
88 )
89 {
90 my $res = eval { $callbacks->{'Handler'}->end_prefix_mapping(@_) };
91 if ($@) {
92 die $@;
93 }
94 else {
95 # I think there's a buggette here...
96 # if the first call throws an exception, we don't set it up right.
97 # Not fatal, but we might want to address it.
98 my $handler = $callbacks->{'Handler'};
99 $self->{Methods}->{'end_prefix_mapping'} = sub { $handler->end_prefix_mapping(@_) };
100 }
101 return $res;
102 }
103 else {
104 $self->{Methods}->{'end_prefix_mapping'} = sub { };
105 }
106 }
107
108}
109
110sub internal_entity_decl {
111 my $self = shift;
112 if (defined $self->{Methods}->{'internal_entity_decl'}) {
113 $self->{Methods}->{'internal_entity_decl'}->(@_);
114 }
115 else {
116 my $method;
117 my $callbacks;
118 if (exists $self->{ParseOptions}) {
119 $callbacks = $self->{ParseOptions};
120 }
121 else {
122 $callbacks = $self;
123 }
124 if (0) { # dummy to make elsif's below compile
125 }
126 elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('internal_entity_decl') ) {
127 my $handler = $callbacks->{'DeclHandler'};
128 $self->{Methods}->{'internal_entity_decl'} = sub { $method->($handler, @_) };
129 return $method->($handler, @_);
130 }
131 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('internal_entity_decl') ) {
132 my $handler = $callbacks->{'Handler'};
133 $self->{Methods}->{'internal_entity_decl'} = sub { $method->($handler, @_) };
134 return $method->($handler, @_);
135 }
136 elsif (defined $callbacks->{'DeclHandler'}
137 and $callbacks->{'DeclHandler'}->can('AUTOLOAD')
138 and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
139 )
140 {
141 my $res = eval { $callbacks->{'DeclHandler'}->internal_entity_decl(@_) };
142 if ($@) {
143 die $@;
144 }
145 else {
146 # I think there's a buggette here...
147 # if the first call throws an exception, we don't set it up right.
148 # Not fatal, but we might want to address it.
149 my $handler = $callbacks->{'DeclHandler'};
150 $self->{Methods}->{'internal_entity_decl'} = sub { $handler->internal_entity_decl(@_) };
151 }
152 return $res;
153 }
154 elsif (defined $callbacks->{'Handler'}
155 and $callbacks->{'Handler'}->can('AUTOLOAD')
156 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
157 )
158 {
159 my $res = eval { $callbacks->{'Handler'}->internal_entity_decl(@_) };
160 if ($@) {
161 die $@;
162 }
163 else {
164 # I think there's a buggette here...
165 # if the first call throws an exception, we don't set it up right.
166 # Not fatal, but we might want to address it.
167 my $handler = $callbacks->{'Handler'};
168 $self->{Methods}->{'internal_entity_decl'} = sub { $handler->internal_entity_decl(@_) };
169 }
170 return $res;
171 }
172 else {
173 $self->{Methods}->{'internal_entity_decl'} = sub { };
174 }
175 }
176
177}
178
179
# spent 51.2ms (37.9+13.3) within XML::SAX::Base::characters which was called 291 times, avg 176µs/call: # 291 times (37.9ms+13.3ms) by XML::LibXML::_parse_sax_string at line 833 of XML/LibXML.pm, avg 176µs/call
sub characters {
180291542µs my $self = shift;
1812916.10ms28913.2ms if (defined $self->{Methods}->{'characters'}) {
# spent 13.2ms making 289 calls to XML::SAX::Base::__ANON__[XML/SAX/Base.pm:207], avg 46µs/call
182 $self->{Methods}->{'characters'}->(@_);
183 }
184 else {
18522µs my $method;
18621µs my $callbacks;
18729µs if (exists $self->{ParseOptions}) {
188 $callbacks = $self->{ParseOptions};
189 }
190 else {
191 $callbacks = $self;
192 }
193269µs216µs if (0) { # dummy to make elsif's below compile
# spent 16µs making 2 calls to UNIVERSAL::can, avg 8µs/call
194 }
195 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('characters') ) {
196 my $handler = $callbacks->{'ContentHandler'};
197 $self->{Methods}->{'characters'} = sub { $method->($handler, @_) };
198 return $method->($handler, @_);
199 }
200 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('characters') ) {
201 my $handler = $callbacks->{'DocumentHandler'};
202 $self->{Methods}->{'characters'} = sub { $method->($handler, @_) };
203 return $method->($handler, @_);
204 }
205 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('characters') ) {
20626µs my $handler = $callbacks->{'Handler'};
20729135.9ms2897.09ms
# spent 13.2ms (6.14+7.09) within XML::SAX::Base::__ANON__[/usr/lib64/perl5/vendor_perl/5.16.0/XML/SAX/Base.pm:207] which was called 289 times, avg 46µs/call: # 289 times (6.14ms+7.09ms) by XML::SAX::Base::characters at line 181, avg 46µs/call
$self->{Methods}->{'characters'} = sub { $method->($handler, @_) };
# spent 7.09ms making 289 calls to XML::Simple::characters, avg 25µs/call
208253µs265µs return $method->($handler, @_);
# spent 65µs making 2 calls to XML::Simple::characters, avg 33µs/call
209 }
210 elsif (defined $callbacks->{'ContentHandler'}
211 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
212 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
213 )
214 {
215 my $res = eval { $callbacks->{'ContentHandler'}->characters(@_) };
216 if ($@) {
217 die $@;
218 }
219 else {
220 # I think there's a buggette here...
221 # if the first call throws an exception, we don't set it up right.
222 # Not fatal, but we might want to address it.
223 my $handler = $callbacks->{'ContentHandler'};
224 $self->{Methods}->{'characters'} = sub { $handler->characters(@_) };
225 }
226 return $res;
227 }
228 elsif (defined $callbacks->{'DocumentHandler'}
229 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
230 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
231 )
232 {
233 my $res = eval { $callbacks->{'DocumentHandler'}->characters(@_) };
234 if ($@) {
235 die $@;
236 }
237 else {
238 # I think there's a buggette here...
239 # if the first call throws an exception, we don't set it up right.
240 # Not fatal, but we might want to address it.
241 my $handler = $callbacks->{'DocumentHandler'};
242 $self->{Methods}->{'characters'} = sub { $handler->characters(@_) };
243 }
244 return $res;
245 }
246 elsif (defined $callbacks->{'Handler'}
247 and $callbacks->{'Handler'}->can('AUTOLOAD')
248 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
249 )
250 {
251 my $res = eval { $callbacks->{'Handler'}->characters(@_) };
252 if ($@) {
253 die $@;
254 }
255 else {
256 # I think there's a buggette here...
257 # if the first call throws an exception, we don't set it up right.
258 # Not fatal, but we might want to address it.
259 my $handler = $callbacks->{'Handler'};
260 $self->{Methods}->{'characters'} = sub { $handler->characters(@_) };
261 }
262 return $res;
263 }
264 else {
265 $self->{Methods}->{'characters'} = sub { };
266 }
267 }
268
269}
270
271
# spent 13.2ms (3.43+9.82) within XML::SAX::Base::start_element which was called 132 times, avg 100µs/call: # 132 times (3.43ms+9.82ms) by XML::LibXML::_parse_sax_string at line 833 of XML/LibXML.pm, avg 100µs/call
sub start_element {
272132274µs my $self = shift;
2731322.96ms1309.69ms if (defined $self->{Methods}->{'start_element'}) {
# spent 9.69ms making 130 calls to XML::SAX::Base::__ANON__[XML/SAX/Base.pm:299], avg 75µs/call
274 $self->{Methods}->{'start_element'}->(@_);
275 }
276 else {
27722µs my $method;
27821µs my $callbacks;
27928µs if (exists $self->{ParseOptions}) {
280 $callbacks = $self->{ParseOptions};
281 }
282 else {
283 $callbacks = $self;
284 }
285268µs217µs if (0) { # dummy to make elsif's below compile
# spent 17µs making 2 calls to UNIVERSAL::can, avg 9µs/call
286 }
287 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('start_element') ) {
288 my $handler = $callbacks->{'ContentHandler'};
289 $self->{Methods}->{'start_element'} = sub { $method->($handler, @_) };
290 return $method->($handler, @_);
291 }
292 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('start_element') ) {
293 my $handler = $callbacks->{'DocumentHandler'};
294 $self->{Methods}->{'start_element'} = sub { $method->($handler, @_) };
295 return $method->($handler, @_);
296 }
297 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_element') ) {
29826µs my $handler = $callbacks->{'Handler'};
2991322.42ms1306.83ms
# spent 9.69ms (2.86+6.83) within XML::SAX::Base::__ANON__[/usr/lib64/perl5/vendor_perl/5.16.0/XML/SAX/Base.pm:299] which was called 130 times, avg 75µs/call: # 130 times (2.86ms+6.83ms) by XML::SAX::Base::start_element at line 273, avg 75µs/call
$self->{Methods}->{'start_element'} = sub { $method->($handler, @_) };
# spent 6.83ms making 130 calls to XML::Simple::start_element, avg 53µs/call
300255µs2111µs return $method->($handler, @_);
# spent 111µs making 2 calls to XML::Simple::start_element, avg 55µs/call
301 }
302 elsif (defined $callbacks->{'ContentHandler'}
303 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
304 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
305 )
306 {
307 my $res = eval { $callbacks->{'ContentHandler'}->start_element(@_) };
308 if ($@) {
309 die $@;
310 }
311 else {
312 # I think there's a buggette here...
313 # if the first call throws an exception, we don't set it up right.
314 # Not fatal, but we might want to address it.
315 my $handler = $callbacks->{'ContentHandler'};
316 $self->{Methods}->{'start_element'} = sub { $handler->start_element(@_) };
317 }
318 return $res;
319 }
320 elsif (defined $callbacks->{'DocumentHandler'}
321 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
322 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
323 )
324 {
325 my $res = eval { $callbacks->{'DocumentHandler'}->start_element(@_) };
326 if ($@) {
327 die $@;
328 }
329 else {
330 # I think there's a buggette here...
331 # if the first call throws an exception, we don't set it up right.
332 # Not fatal, but we might want to address it.
333 my $handler = $callbacks->{'DocumentHandler'};
334 $self->{Methods}->{'start_element'} = sub { $handler->start_element(@_) };
335 }
336 return $res;
337 }
338 elsif (defined $callbacks->{'Handler'}
339 and $callbacks->{'Handler'}->can('AUTOLOAD')
340 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
341 )
342 {
343 my $res = eval { $callbacks->{'Handler'}->start_element(@_) };
344 if ($@) {
345 die $@;
346 }
347 else {
348 # I think there's a buggette here...
349 # if the first call throws an exception, we don't set it up right.
350 # Not fatal, but we might want to address it.
351 my $handler = $callbacks->{'Handler'};
352 $self->{Methods}->{'start_element'} = sub { $handler->start_element(@_) };
353 }
354 return $res;
355 }
356 else {
357 $self->{Methods}->{'start_element'} = sub { };
358 }
359 }
360
361}
362
363sub external_entity_decl {
364 my $self = shift;
365 if (defined $self->{Methods}->{'external_entity_decl'}) {
366 $self->{Methods}->{'external_entity_decl'}->(@_);
367 }
368 else {
369 my $method;
370 my $callbacks;
371 if (exists $self->{ParseOptions}) {
372 $callbacks = $self->{ParseOptions};
373 }
374 else {
375 $callbacks = $self;
376 }
377 if (0) { # dummy to make elsif's below compile
378 }
379 elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('external_entity_decl') ) {
380 my $handler = $callbacks->{'DeclHandler'};
381 $self->{Methods}->{'external_entity_decl'} = sub { $method->($handler, @_) };
382 return $method->($handler, @_);
383 }
384 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('external_entity_decl') ) {
385 my $handler = $callbacks->{'Handler'};
386 $self->{Methods}->{'external_entity_decl'} = sub { $method->($handler, @_) };
387 return $method->($handler, @_);
388 }
389 elsif (defined $callbacks->{'DeclHandler'}
390 and $callbacks->{'DeclHandler'}->can('AUTOLOAD')
391 and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
392 )
393 {
394 my $res = eval { $callbacks->{'DeclHandler'}->external_entity_decl(@_) };
395 if ($@) {
396 die $@;
397 }
398 else {
399 # I think there's a buggette here...
400 # if the first call throws an exception, we don't set it up right.
401 # Not fatal, but we might want to address it.
402 my $handler = $callbacks->{'DeclHandler'};
403 $self->{Methods}->{'external_entity_decl'} = sub { $handler->external_entity_decl(@_) };
404 }
405 return $res;
406 }
407 elsif (defined $callbacks->{'Handler'}
408 and $callbacks->{'Handler'}->can('AUTOLOAD')
409 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
410 )
411 {
412 my $res = eval { $callbacks->{'Handler'}->external_entity_decl(@_) };
413 if ($@) {
414 die $@;
415 }
416 else {
417 # I think there's a buggette here...
418 # if the first call throws an exception, we don't set it up right.
419 # Not fatal, but we might want to address it.
420 my $handler = $callbacks->{'Handler'};
421 $self->{Methods}->{'external_entity_decl'} = sub { $handler->external_entity_decl(@_) };
422 }
423 return $res;
424 }
425 else {
426 $self->{Methods}->{'external_entity_decl'} = sub { };
427 }
428 }
429
430}
431
432
# spent 199µs (156+42) within XML::SAX::Base::xml_decl which was called 2 times, avg 99µs/call: # 2 times (156µs+42µs) by XML::LibXML::_parse_sax_string at line 833 of XML/LibXML.pm, avg 99µs/call
sub xml_decl {
43325µs my $self = shift;
434249µs if (defined $self->{Methods}->{'xml_decl'}) {
435 $self->{Methods}->{'xml_decl'}->(@_);
436 }
437 else {
43822µs my $method;
43922µs my $callbacks;
44027µs if (exists $self->{ParseOptions}) {
441 $callbacks = $self->{ParseOptions};
442 }
443 else {
444 $callbacks = $self;
445 }
4462127µs442µs if (0) { # dummy to make elsif's below compile
# spent 42µs making 4 calls to UNIVERSAL::can, avg 11µs/call
447 }
448 elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('xml_decl') ) {
449 my $handler = $callbacks->{'DTDHandler'};
450 $self->{Methods}->{'xml_decl'} = sub { $method->($handler, @_) };
451 return $method->($handler, @_);
452 }
453 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('xml_decl') ) {
454 my $handler = $callbacks->{'Handler'};
455 $self->{Methods}->{'xml_decl'} = sub { $method->($handler, @_) };
456 return $method->($handler, @_);
457 }
458 elsif (defined $callbacks->{'DTDHandler'}
459 and $callbacks->{'DTDHandler'}->can('AUTOLOAD')
460 and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
461 )
462 {
463 my $res = eval { $callbacks->{'DTDHandler'}->xml_decl(@_) };
464 if ($@) {
465 die $@;
466 }
467 else {
468 # I think there's a buggette here...
469 # if the first call throws an exception, we don't set it up right.
470 # Not fatal, but we might want to address it.
471 my $handler = $callbacks->{'DTDHandler'};
472 $self->{Methods}->{'xml_decl'} = sub { $handler->xml_decl(@_) };
473 }
474 return $res;
475 }
476 elsif (defined $callbacks->{'Handler'}
477 and $callbacks->{'Handler'}->can('AUTOLOAD')
478 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
479 )
480 {
481 my $res = eval { $callbacks->{'Handler'}->xml_decl(@_) };
482 if ($@) {
483 die $@;
484 }
485 else {
486 # I think there's a buggette here...
487 # if the first call throws an exception, we don't set it up right.
488 # Not fatal, but we might want to address it.
489 my $handler = $callbacks->{'Handler'};
490 $self->{Methods}->{'xml_decl'} = sub { $handler->xml_decl(@_) };
491 }
492 return $res;
493 }
494 else {
495231µs $self->{Methods}->{'xml_decl'} = sub { };
496 }
497 }
498
499}
500
501sub entity_decl {
502 my $self = shift;
503 if (defined $self->{Methods}->{'entity_decl'}) {
504 $self->{Methods}->{'entity_decl'}->(@_);
505 }
506 else {
507 my $method;
508 my $callbacks;
509 if (exists $self->{ParseOptions}) {
510 $callbacks = $self->{ParseOptions};
511 }
512 else {
513 $callbacks = $self;
514 }
515 if (0) { # dummy to make elsif's below compile
516 }
517 elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('entity_decl') ) {
518 my $handler = $callbacks->{'DTDHandler'};
519 $self->{Methods}->{'entity_decl'} = sub { $method->($handler, @_) };
520 return $method->($handler, @_);
521 }
522 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('entity_decl') ) {
523 my $handler = $callbacks->{'Handler'};
524 $self->{Methods}->{'entity_decl'} = sub { $method->($handler, @_) };
525 return $method->($handler, @_);
526 }
527 elsif (defined $callbacks->{'DTDHandler'}
528 and $callbacks->{'DTDHandler'}->can('AUTOLOAD')
529 and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
530 )
531 {
532 my $res = eval { $callbacks->{'DTDHandler'}->entity_decl(@_) };
533 if ($@) {
534 die $@;
535 }
536 else {
537 # I think there's a buggette here...
538 # if the first call throws an exception, we don't set it up right.
539 # Not fatal, but we might want to address it.
540 my $handler = $callbacks->{'DTDHandler'};
541 $self->{Methods}->{'entity_decl'} = sub { $handler->entity_decl(@_) };
542 }
543 return $res;
544 }
545 elsif (defined $callbacks->{'Handler'}
546 and $callbacks->{'Handler'}->can('AUTOLOAD')
547 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
548 )
549 {
550 my $res = eval { $callbacks->{'Handler'}->entity_decl(@_) };
551 if ($@) {
552 die $@;
553 }
554 else {
555 # I think there's a buggette here...
556 # if the first call throws an exception, we don't set it up right.
557 # Not fatal, but we might want to address it.
558 my $handler = $callbacks->{'Handler'};
559 $self->{Methods}->{'entity_decl'} = sub { $handler->entity_decl(@_) };
560 }
561 return $res;
562 }
563 else {
564 $self->{Methods}->{'entity_decl'} = sub { };
565 }
566 }
567
568}
569
570sub end_dtd {
571 my $self = shift;
572 if (defined $self->{Methods}->{'end_dtd'}) {
573 $self->{Methods}->{'end_dtd'}->(@_);
574 }
575 else {
576 my $method;
577 my $callbacks;
578 if (exists $self->{ParseOptions}) {
579 $callbacks = $self->{ParseOptions};
580 }
581 else {
582 $callbacks = $self;
583 }
584 if (0) { # dummy to make elsif's below compile
585 }
586 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('end_dtd') ) {
587 my $handler = $callbacks->{'LexicalHandler'};
588 $self->{Methods}->{'end_dtd'} = sub { $method->($handler, @_) };
589 return $method->($handler, @_);
590 }
591 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_dtd') ) {
592 my $handler = $callbacks->{'Handler'};
593 $self->{Methods}->{'end_dtd'} = sub { $method->($handler, @_) };
594 return $method->($handler, @_);
595 }
596 elsif (defined $callbacks->{'LexicalHandler'}
597 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
598 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
599 )
600 {
601 my $res = eval { $callbacks->{'LexicalHandler'}->end_dtd(@_) };
602 if ($@) {
603 die $@;
604 }
605 else {
606 # I think there's a buggette here...
607 # if the first call throws an exception, we don't set it up right.
608 # Not fatal, but we might want to address it.
609 my $handler = $callbacks->{'LexicalHandler'};
610 $self->{Methods}->{'end_dtd'} = sub { $handler->end_dtd(@_) };
611 }
612 return $res;
613 }
614 elsif (defined $callbacks->{'Handler'}
615 and $callbacks->{'Handler'}->can('AUTOLOAD')
616 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
617 )
618 {
619 my $res = eval { $callbacks->{'Handler'}->end_dtd(@_) };
620 if ($@) {
621 die $@;
622 }
623 else {
624 # I think there's a buggette here...
625 # if the first call throws an exception, we don't set it up right.
626 # Not fatal, but we might want to address it.
627 my $handler = $callbacks->{'Handler'};
628 $self->{Methods}->{'end_dtd'} = sub { $handler->end_dtd(@_) };
629 }
630 return $res;
631 }
632 else {
633 $self->{Methods}->{'end_dtd'} = sub { };
634 }
635 }
636
637}
638
639sub unparsed_entity_decl {
640 my $self = shift;
641 if (defined $self->{Methods}->{'unparsed_entity_decl'}) {
642 $self->{Methods}->{'unparsed_entity_decl'}->(@_);
643 }
644 else {
645 my $method;
646 my $callbacks;
647 if (exists $self->{ParseOptions}) {
648 $callbacks = $self->{ParseOptions};
649 }
650 else {
651 $callbacks = $self;
652 }
653 if (0) { # dummy to make elsif's below compile
654 }
655 elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('unparsed_entity_decl') ) {
656 my $handler = $callbacks->{'DTDHandler'};
657 $self->{Methods}->{'unparsed_entity_decl'} = sub { $method->($handler, @_) };
658 return $method->($handler, @_);
659 }
660 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('unparsed_entity_decl') ) {
661 my $handler = $callbacks->{'Handler'};
662 $self->{Methods}->{'unparsed_entity_decl'} = sub { $method->($handler, @_) };
663 return $method->($handler, @_);
664 }
665 elsif (defined $callbacks->{'DTDHandler'}
666 and $callbacks->{'DTDHandler'}->can('AUTOLOAD')
667 and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
668 )
669 {
670 my $res = eval { $callbacks->{'DTDHandler'}->unparsed_entity_decl(@_) };
671 if ($@) {
672 die $@;
673 }
674 else {
675 # I think there's a buggette here...
676 # if the first call throws an exception, we don't set it up right.
677 # Not fatal, but we might want to address it.
678 my $handler = $callbacks->{'DTDHandler'};
679 $self->{Methods}->{'unparsed_entity_decl'} = sub { $handler->unparsed_entity_decl(@_) };
680 }
681 return $res;
682 }
683 elsif (defined $callbacks->{'Handler'}
684 and $callbacks->{'Handler'}->can('AUTOLOAD')
685 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
686 )
687 {
688 my $res = eval { $callbacks->{'Handler'}->unparsed_entity_decl(@_) };
689 if ($@) {
690 die $@;
691 }
692 else {
693 # I think there's a buggette here...
694 # if the first call throws an exception, we don't set it up right.
695 # Not fatal, but we might want to address it.
696 my $handler = $callbacks->{'Handler'};
697 $self->{Methods}->{'unparsed_entity_decl'} = sub { $handler->unparsed_entity_decl(@_) };
698 }
699 return $res;
700 }
701 else {
702 $self->{Methods}->{'unparsed_entity_decl'} = sub { };
703 }
704 }
705
706}
707
708sub processing_instruction {
709 my $self = shift;
710 if (defined $self->{Methods}->{'processing_instruction'}) {
711 $self->{Methods}->{'processing_instruction'}->(@_);
712 }
713 else {
714 my $method;
715 my $callbacks;
716 if (exists $self->{ParseOptions}) {
717 $callbacks = $self->{ParseOptions};
718 }
719 else {
720 $callbacks = $self;
721 }
722 if (0) { # dummy to make elsif's below compile
723 }
724 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('processing_instruction') ) {
725 my $handler = $callbacks->{'ContentHandler'};
726 $self->{Methods}->{'processing_instruction'} = sub { $method->($handler, @_) };
727 return $method->($handler, @_);
728 }
729 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('processing_instruction') ) {
730 my $handler = $callbacks->{'DocumentHandler'};
731 $self->{Methods}->{'processing_instruction'} = sub { $method->($handler, @_) };
732 return $method->($handler, @_);
733 }
734 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('processing_instruction') ) {
735 my $handler = $callbacks->{'Handler'};
736 $self->{Methods}->{'processing_instruction'} = sub { $method->($handler, @_) };
737 return $method->($handler, @_);
738 }
739 elsif (defined $callbacks->{'ContentHandler'}
740 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
741 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
742 )
743 {
744 my $res = eval { $callbacks->{'ContentHandler'}->processing_instruction(@_) };
745 if ($@) {
746 die $@;
747 }
748 else {
749 # I think there's a buggette here...
750 # if the first call throws an exception, we don't set it up right.
751 # Not fatal, but we might want to address it.
752 my $handler = $callbacks->{'ContentHandler'};
753 $self->{Methods}->{'processing_instruction'} = sub { $handler->processing_instruction(@_) };
754 }
755 return $res;
756 }
757 elsif (defined $callbacks->{'DocumentHandler'}
758 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
759 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
760 )
761 {
762 my $res = eval { $callbacks->{'DocumentHandler'}->processing_instruction(@_) };
763 if ($@) {
764 die $@;
765 }
766 else {
767 # I think there's a buggette here...
768 # if the first call throws an exception, we don't set it up right.
769 # Not fatal, but we might want to address it.
770 my $handler = $callbacks->{'DocumentHandler'};
771 $self->{Methods}->{'processing_instruction'} = sub { $handler->processing_instruction(@_) };
772 }
773 return $res;
774 }
775 elsif (defined $callbacks->{'Handler'}
776 and $callbacks->{'Handler'}->can('AUTOLOAD')
777 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
778 )
779 {
780 my $res = eval { $callbacks->{'Handler'}->processing_instruction(@_) };
781 if ($@) {
782 die $@;
783 }
784 else {
785 # I think there's a buggette here...
786 # if the first call throws an exception, we don't set it up right.
787 # Not fatal, but we might want to address it.
788 my $handler = $callbacks->{'Handler'};
789 $self->{Methods}->{'processing_instruction'} = sub { $handler->processing_instruction(@_) };
790 }
791 return $res;
792 }
793 else {
794 $self->{Methods}->{'processing_instruction'} = sub { };
795 }
796 }
797
798}
799
800sub attribute_decl {
801 my $self = shift;
802 if (defined $self->{Methods}->{'attribute_decl'}) {
803 $self->{Methods}->{'attribute_decl'}->(@_);
804 }
805 else {
806 my $method;
807 my $callbacks;
808 if (exists $self->{ParseOptions}) {
809 $callbacks = $self->{ParseOptions};
810 }
811 else {
812 $callbacks = $self;
813 }
814 if (0) { # dummy to make elsif's below compile
815 }
816 elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('attribute_decl') ) {
817 my $handler = $callbacks->{'DeclHandler'};
818 $self->{Methods}->{'attribute_decl'} = sub { $method->($handler, @_) };
819 return $method->($handler, @_);
820 }
821 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('attribute_decl') ) {
822 my $handler = $callbacks->{'Handler'};
823 $self->{Methods}->{'attribute_decl'} = sub { $method->($handler, @_) };
824 return $method->($handler, @_);
825 }
826 elsif (defined $callbacks->{'DeclHandler'}
827 and $callbacks->{'DeclHandler'}->can('AUTOLOAD')
828 and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
829 )
830 {
831 my $res = eval { $callbacks->{'DeclHandler'}->attribute_decl(@_) };
832 if ($@) {
833 die $@;
834 }
835 else {
836 # I think there's a buggette here...
837 # if the first call throws an exception, we don't set it up right.
838 # Not fatal, but we might want to address it.
839 my $handler = $callbacks->{'DeclHandler'};
840 $self->{Methods}->{'attribute_decl'} = sub { $handler->attribute_decl(@_) };
841 }
842 return $res;
843 }
844 elsif (defined $callbacks->{'Handler'}
845 and $callbacks->{'Handler'}->can('AUTOLOAD')
846 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
847 )
848 {
849 my $res = eval { $callbacks->{'Handler'}->attribute_decl(@_) };
850 if ($@) {
851 die $@;
852 }
853 else {
854 # I think there's a buggette here...
855 # if the first call throws an exception, we don't set it up right.
856 # Not fatal, but we might want to address it.
857 my $handler = $callbacks->{'Handler'};
858 $self->{Methods}->{'attribute_decl'} = sub { $handler->attribute_decl(@_) };
859 }
860 return $res;
861 }
862 else {
863 $self->{Methods}->{'attribute_decl'} = sub { };
864 }
865 }
866
867}
868
869sub fatal_error {
870 my $self = shift;
871 if (defined $self->{Methods}->{'fatal_error'}) {
872 $self->{Methods}->{'fatal_error'}->(@_);
873 }
874 else {
875 my $method;
876 my $callbacks;
877 if (exists $self->{ParseOptions}) {
878 $callbacks = $self->{ParseOptions};
879 }
880 else {
881 $callbacks = $self;
882 }
883 if (0) { # dummy to make elsif's below compile
884 }
885 elsif (defined $callbacks->{'ErrorHandler'} and $method = $callbacks->{'ErrorHandler'}->can('fatal_error') ) {
886 my $handler = $callbacks->{'ErrorHandler'};
887 $self->{Methods}->{'fatal_error'} = sub { $method->($handler, @_) };
888 return $method->($handler, @_);
889 }
890 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('fatal_error') ) {
891 my $handler = $callbacks->{'Handler'};
892 $self->{Methods}->{'fatal_error'} = sub { $method->($handler, @_) };
893 return $method->($handler, @_);
894 }
895 elsif (defined $callbacks->{'ErrorHandler'}
896 and $callbacks->{'ErrorHandler'}->can('AUTOLOAD')
897 and $callbacks->{'ErrorHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
898 )
899 {
900 my $res = eval { $callbacks->{'ErrorHandler'}->fatal_error(@_) };
901 if ($@) {
902 die $@;
903 }
904 else {
905 # I think there's a buggette here...
906 # if the first call throws an exception, we don't set it up right.
907 # Not fatal, but we might want to address it.
908 my $handler = $callbacks->{'ErrorHandler'};
909 $self->{Methods}->{'fatal_error'} = sub { $handler->fatal_error(@_) };
910 }
911 return $res;
912 }
913 elsif (defined $callbacks->{'Handler'}
914 and $callbacks->{'Handler'}->can('AUTOLOAD')
915 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
916 )
917 {
918 my $res = eval { $callbacks->{'Handler'}->fatal_error(@_) };
919 if ($@) {
920 die $@;
921 }
922 else {
923 # I think there's a buggette here...
924 # if the first call throws an exception, we don't set it up right.
925 # Not fatal, but we might want to address it.
926 my $handler = $callbacks->{'Handler'};
927 $self->{Methods}->{'fatal_error'} = sub { $handler->fatal_error(@_) };
928 }
929 return $res;
930 }
931 else {
932 $self->{Methods}->{'fatal_error'} = sub { };
933 }
934 }
935
936}
937
938sub end_cdata {
939 my $self = shift;
940 if (defined $self->{Methods}->{'end_cdata'}) {
941 $self->{Methods}->{'end_cdata'}->(@_);
942 }
943 else {
944 my $method;
945 my $callbacks;
946 if (exists $self->{ParseOptions}) {
947 $callbacks = $self->{ParseOptions};
948 }
949 else {
950 $callbacks = $self;
951 }
952 if (0) { # dummy to make elsif's below compile
953 }
954 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('end_cdata') ) {
955 my $handler = $callbacks->{'DocumentHandler'};
956 $self->{Methods}->{'end_cdata'} = sub { $method->($handler, @_) };
957 return $method->($handler, @_);
958 }
959 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('end_cdata') ) {
960 my $handler = $callbacks->{'LexicalHandler'};
961 $self->{Methods}->{'end_cdata'} = sub { $method->($handler, @_) };
962 return $method->($handler, @_);
963 }
964 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_cdata') ) {
965 my $handler = $callbacks->{'Handler'};
966 $self->{Methods}->{'end_cdata'} = sub { $method->($handler, @_) };
967 return $method->($handler, @_);
968 }
969 elsif (defined $callbacks->{'DocumentHandler'}
970 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
971 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
972 )
973 {
974 my $res = eval { $callbacks->{'DocumentHandler'}->end_cdata(@_) };
975 if ($@) {
976 die $@;
977 }
978 else {
979 # I think there's a buggette here...
980 # if the first call throws an exception, we don't set it up right.
981 # Not fatal, but we might want to address it.
982 my $handler = $callbacks->{'DocumentHandler'};
983 $self->{Methods}->{'end_cdata'} = sub { $handler->end_cdata(@_) };
984 }
985 return $res;
986 }
987 elsif (defined $callbacks->{'LexicalHandler'}
988 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
989 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
990 )
991 {
992 my $res = eval { $callbacks->{'LexicalHandler'}->end_cdata(@_) };
993 if ($@) {
994 die $@;
995 }
996 else {
997 # I think there's a buggette here...
998 # if the first call throws an exception, we don't set it up right.
999 # Not fatal, but we might want to address it.
1000 my $handler = $callbacks->{'LexicalHandler'};
1001 $self->{Methods}->{'end_cdata'} = sub { $handler->end_cdata(@_) };
1002 }
1003 return $res;
1004 }
1005 elsif (defined $callbacks->{'Handler'}
1006 and $callbacks->{'Handler'}->can('AUTOLOAD')
1007 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1008 )
1009 {
1010 my $res = eval { $callbacks->{'Handler'}->end_cdata(@_) };
1011 if ($@) {
1012 die $@;
1013 }
1014 else {
1015 # I think there's a buggette here...
1016 # if the first call throws an exception, we don't set it up right.
1017 # Not fatal, but we might want to address it.
1018 my $handler = $callbacks->{'Handler'};
1019 $self->{Methods}->{'end_cdata'} = sub { $handler->end_cdata(@_) };
1020 }
1021 return $res;
1022 }
1023 else {
1024 $self->{Methods}->{'end_cdata'} = sub { };
1025 }
1026 }
1027
1028}
1029
1030sub start_entity {
1031 my $self = shift;
1032 if (defined $self->{Methods}->{'start_entity'}) {
1033 $self->{Methods}->{'start_entity'}->(@_);
1034 }
1035 else {
1036 my $method;
1037 my $callbacks;
1038 if (exists $self->{ParseOptions}) {
1039 $callbacks = $self->{ParseOptions};
1040 }
1041 else {
1042 $callbacks = $self;
1043 }
1044 if (0) { # dummy to make elsif's below compile
1045 }
1046 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('start_entity') ) {
1047 my $handler = $callbacks->{'LexicalHandler'};
1048 $self->{Methods}->{'start_entity'} = sub { $method->($handler, @_) };
1049 return $method->($handler, @_);
1050 }
1051 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_entity') ) {
1052 my $handler = $callbacks->{'Handler'};
1053 $self->{Methods}->{'start_entity'} = sub { $method->($handler, @_) };
1054 return $method->($handler, @_);
1055 }
1056 elsif (defined $callbacks->{'LexicalHandler'}
1057 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
1058 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1059 )
1060 {
1061 my $res = eval { $callbacks->{'LexicalHandler'}->start_entity(@_) };
1062 if ($@) {
1063 die $@;
1064 }
1065 else {
1066 # I think there's a buggette here...
1067 # if the first call throws an exception, we don't set it up right.
1068 # Not fatal, but we might want to address it.
1069 my $handler = $callbacks->{'LexicalHandler'};
1070 $self->{Methods}->{'start_entity'} = sub { $handler->start_entity(@_) };
1071 }
1072 return $res;
1073 }
1074 elsif (defined $callbacks->{'Handler'}
1075 and $callbacks->{'Handler'}->can('AUTOLOAD')
1076 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1077 )
1078 {
1079 my $res = eval { $callbacks->{'Handler'}->start_entity(@_) };
1080 if ($@) {
1081 die $@;
1082 }
1083 else {
1084 # I think there's a buggette here...
1085 # if the first call throws an exception, we don't set it up right.
1086 # Not fatal, but we might want to address it.
1087 my $handler = $callbacks->{'Handler'};
1088 $self->{Methods}->{'start_entity'} = sub { $handler->start_entity(@_) };
1089 }
1090 return $res;
1091 }
1092 else {
1093 $self->{Methods}->{'start_entity'} = sub { };
1094 }
1095 }
1096
1097}
1098
1099sub start_prefix_mapping {
1100 my $self = shift;
1101 if (defined $self->{Methods}->{'start_prefix_mapping'}) {
1102 $self->{Methods}->{'start_prefix_mapping'}->(@_);
1103 }
1104 else {
1105 my $method;
1106 my $callbacks;
1107 if (exists $self->{ParseOptions}) {
1108 $callbacks = $self->{ParseOptions};
1109 }
1110 else {
1111 $callbacks = $self;
1112 }
1113 if (0) { # dummy to make elsif's below compile
1114 }
1115 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('start_prefix_mapping') ) {
1116 my $handler = $callbacks->{'ContentHandler'};
1117 $self->{Methods}->{'start_prefix_mapping'} = sub { $method->($handler, @_) };
1118 return $method->($handler, @_);
1119 }
1120 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_prefix_mapping') ) {
1121 my $handler = $callbacks->{'Handler'};
1122 $self->{Methods}->{'start_prefix_mapping'} = sub { $method->($handler, @_) };
1123 return $method->($handler, @_);
1124 }
1125 elsif (defined $callbacks->{'ContentHandler'}
1126 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
1127 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1128 )
1129 {
1130 my $res = eval { $callbacks->{'ContentHandler'}->start_prefix_mapping(@_) };
1131 if ($@) {
1132 die $@;
1133 }
1134 else {
1135 # I think there's a buggette here...
1136 # if the first call throws an exception, we don't set it up right.
1137 # Not fatal, but we might want to address it.
1138 my $handler = $callbacks->{'ContentHandler'};
1139 $self->{Methods}->{'start_prefix_mapping'} = sub { $handler->start_prefix_mapping(@_) };
1140 }
1141 return $res;
1142 }
1143 elsif (defined $callbacks->{'Handler'}
1144 and $callbacks->{'Handler'}->can('AUTOLOAD')
1145 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1146 )
1147 {
1148 my $res = eval { $callbacks->{'Handler'}->start_prefix_mapping(@_) };
1149 if ($@) {
1150 die $@;
1151 }
1152 else {
1153 # I think there's a buggette here...
1154 # if the first call throws an exception, we don't set it up right.
1155 # Not fatal, but we might want to address it.
1156 my $handler = $callbacks->{'Handler'};
1157 $self->{Methods}->{'start_prefix_mapping'} = sub { $handler->start_prefix_mapping(@_) };
1158 }
1159 return $res;
1160 }
1161 else {
1162 $self->{Methods}->{'start_prefix_mapping'} = sub { };
1163 }
1164 }
1165
1166}
1167
1168sub error {
1169 my $self = shift;
1170 if (defined $self->{Methods}->{'error'}) {
1171 $self->{Methods}->{'error'}->(@_);
1172 }
1173 else {
1174 my $method;
1175 my $callbacks;
1176 if (exists $self->{ParseOptions}) {
1177 $callbacks = $self->{ParseOptions};
1178 }
1179 else {
1180 $callbacks = $self;
1181 }
1182 if (0) { # dummy to make elsif's below compile
1183 }
1184 elsif (defined $callbacks->{'ErrorHandler'} and $method = $callbacks->{'ErrorHandler'}->can('error') ) {
1185 my $handler = $callbacks->{'ErrorHandler'};
1186 $self->{Methods}->{'error'} = sub { $method->($handler, @_) };
1187 return $method->($handler, @_);
1188 }
1189 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('error') ) {
1190 my $handler = $callbacks->{'Handler'};
1191 $self->{Methods}->{'error'} = sub { $method->($handler, @_) };
1192 return $method->($handler, @_);
1193 }
1194 elsif (defined $callbacks->{'ErrorHandler'}
1195 and $callbacks->{'ErrorHandler'}->can('AUTOLOAD')
1196 and $callbacks->{'ErrorHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1197 )
1198 {
1199 my $res = eval { $callbacks->{'ErrorHandler'}->error(@_) };
1200 if ($@) {
1201 die $@;
1202 }
1203 else {
1204 # I think there's a buggette here...
1205 # if the first call throws an exception, we don't set it up right.
1206 # Not fatal, but we might want to address it.
1207 my $handler = $callbacks->{'ErrorHandler'};
1208 $self->{Methods}->{'error'} = sub { $handler->error(@_) };
1209 }
1210 return $res;
1211 }
1212 elsif (defined $callbacks->{'Handler'}
1213 and $callbacks->{'Handler'}->can('AUTOLOAD')
1214 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1215 )
1216 {
1217 my $res = eval { $callbacks->{'Handler'}->error(@_) };
1218 if ($@) {
1219 die $@;
1220 }
1221 else {
1222 # I think there's a buggette here...
1223 # if the first call throws an exception, we don't set it up right.
1224 # Not fatal, but we might want to address it.
1225 my $handler = $callbacks->{'Handler'};
1226 $self->{Methods}->{'error'} = sub { $handler->error(@_) };
1227 }
1228 return $res;
1229 }
1230 else {
1231 $self->{Methods}->{'error'} = sub { };
1232 }
1233 }
1234
1235}
1236
1237
# spent 316µs (234+82) within XML::SAX::Base::start_document which was called 2 times, avg 158µs/call: # 2 times (234µs+82µs) by XML::LibXML::_parse_sax_string at line 833 of XML/LibXML.pm, avg 158µs/call
sub start_document {
123825µs my $self = shift;
1239214µs if (defined $self->{Methods}->{'start_document'}) {
1240 $self->{Methods}->{'start_document'}->(@_);
1241 }
1242 else {
124323µs my $method;
124421µs my $callbacks;
124528µs if (exists $self->{ParseOptions}) {
1246 $callbacks = $self->{ParseOptions};
1247 }
1248 else {
1249 $callbacks = $self;
1250 }
1251294µs221µs if (0) { # dummy to make elsif's below compile
# spent 21µs making 2 calls to UNIVERSAL::can, avg 10µs/call
1252 }
1253 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('start_document') ) {
1254 my $handler = $callbacks->{'ContentHandler'};
1255 $self->{Methods}->{'start_document'} = sub { $method->($handler, @_) };
1256 return $method->($handler, @_);
1257 }
1258 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('start_document') ) {
1259 my $handler = $callbacks->{'DocumentHandler'};
1260 $self->{Methods}->{'start_document'} = sub { $method->($handler, @_) };
1261 return $method->($handler, @_);
1262 }
1263 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_document') ) {
126426µs my $handler = $callbacks->{'Handler'};
1265258µs $self->{Methods}->{'start_document'} = sub { $method->($handler, @_) };
1266262µs261µs return $method->($handler, @_);
# spent 61µs making 2 calls to XML::Simple::start_document, avg 31µs/call
1267 }
1268 elsif (defined $callbacks->{'ContentHandler'}
1269 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
1270 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1271 )
1272 {
1273 my $res = eval { $callbacks->{'ContentHandler'}->start_document(@_) };
1274 if ($@) {
1275 die $@;
1276 }
1277 else {
1278 # I think there's a buggette here...
1279 # if the first call throws an exception, we don't set it up right.
1280 # Not fatal, but we might want to address it.
1281 my $handler = $callbacks->{'ContentHandler'};
1282 $self->{Methods}->{'start_document'} = sub { $handler->start_document(@_) };
1283 }
1284 return $res;
1285 }
1286 elsif (defined $callbacks->{'DocumentHandler'}
1287 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
1288 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1289 )
1290 {
1291 my $res = eval { $callbacks->{'DocumentHandler'}->start_document(@_) };
1292 if ($@) {
1293 die $@;
1294 }
1295 else {
1296 # I think there's a buggette here...
1297 # if the first call throws an exception, we don't set it up right.
1298 # Not fatal, but we might want to address it.
1299 my $handler = $callbacks->{'DocumentHandler'};
1300 $self->{Methods}->{'start_document'} = sub { $handler->start_document(@_) };
1301 }
1302 return $res;
1303 }
1304 elsif (defined $callbacks->{'Handler'}
1305 and $callbacks->{'Handler'}->can('AUTOLOAD')
1306 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1307 )
1308 {
1309 my $res = eval { $callbacks->{'Handler'}->start_document(@_) };
1310 if ($@) {
1311 die $@;
1312 }
1313 else {
1314 # I think there's a buggette here...
1315 # if the first call throws an exception, we don't set it up right.
1316 # Not fatal, but we might want to address it.
1317 my $handler = $callbacks->{'Handler'};
1318 $self->{Methods}->{'start_document'} = sub { $handler->start_document(@_) };
1319 }
1320 return $res;
1321 }
1322 else {
1323 $self->{Methods}->{'start_document'} = sub { };
1324 }
1325 }
1326
1327}
1328
1329sub ignorable_whitespace {
1330 my $self = shift;
1331 if (defined $self->{Methods}->{'ignorable_whitespace'}) {
1332 $self->{Methods}->{'ignorable_whitespace'}->(@_);
1333 }
1334 else {
1335 my $method;
1336 my $callbacks;
1337 if (exists $self->{ParseOptions}) {
1338 $callbacks = $self->{ParseOptions};
1339 }
1340 else {
1341 $callbacks = $self;
1342 }
1343 if (0) { # dummy to make elsif's below compile
1344 }
1345 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('ignorable_whitespace') ) {
1346 my $handler = $callbacks->{'ContentHandler'};
1347 $self->{Methods}->{'ignorable_whitespace'} = sub { $method->($handler, @_) };
1348 return $method->($handler, @_);
1349 }
1350 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('ignorable_whitespace') ) {
1351 my $handler = $callbacks->{'DocumentHandler'};
1352 $self->{Methods}->{'ignorable_whitespace'} = sub { $method->($handler, @_) };
1353 return $method->($handler, @_);
1354 }
1355 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('ignorable_whitespace') ) {
1356 my $handler = $callbacks->{'Handler'};
1357 $self->{Methods}->{'ignorable_whitespace'} = sub { $method->($handler, @_) };
1358 return $method->($handler, @_);
1359 }
1360 elsif (defined $callbacks->{'ContentHandler'}
1361 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
1362 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1363 )
1364 {
1365 my $res = eval { $callbacks->{'ContentHandler'}->ignorable_whitespace(@_) };
1366 if ($@) {
1367 die $@;
1368 }
1369 else {
1370 # I think there's a buggette here...
1371 # if the first call throws an exception, we don't set it up right.
1372 # Not fatal, but we might want to address it.
1373 my $handler = $callbacks->{'ContentHandler'};
1374 $self->{Methods}->{'ignorable_whitespace'} = sub { $handler->ignorable_whitespace(@_) };
1375 }
1376 return $res;
1377 }
1378 elsif (defined $callbacks->{'DocumentHandler'}
1379 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
1380 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1381 )
1382 {
1383 my $res = eval { $callbacks->{'DocumentHandler'}->ignorable_whitespace(@_) };
1384 if ($@) {
1385 die $@;
1386 }
1387 else {
1388 # I think there's a buggette here...
1389 # if the first call throws an exception, we don't set it up right.
1390 # Not fatal, but we might want to address it.
1391 my $handler = $callbacks->{'DocumentHandler'};
1392 $self->{Methods}->{'ignorable_whitespace'} = sub { $handler->ignorable_whitespace(@_) };
1393 }
1394 return $res;
1395 }
1396 elsif (defined $callbacks->{'Handler'}
1397 and $callbacks->{'Handler'}->can('AUTOLOAD')
1398 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1399 )
1400 {
1401 my $res = eval { $callbacks->{'Handler'}->ignorable_whitespace(@_) };
1402 if ($@) {
1403 die $@;
1404 }
1405 else {
1406 # I think there's a buggette here...
1407 # if the first call throws an exception, we don't set it up right.
1408 # Not fatal, but we might want to address it.
1409 my $handler = $callbacks->{'Handler'};
1410 $self->{Methods}->{'ignorable_whitespace'} = sub { $handler->ignorable_whitespace(@_) };
1411 }
1412 return $res;
1413 }
1414 else {
1415 $self->{Methods}->{'ignorable_whitespace'} = sub { };
1416 }
1417 }
1418
1419}
1420
1421
# spent 290µs (205+85) within XML::SAX::Base::end_document which was called 2 times, avg 145µs/call: # 2 times (205µs+85µs) by XML::LibXML::SAX::_parse_string at line 65 of XML/LibXML/SAX.pm, avg 145µs/call
sub end_document {
142225µs my $self = shift;
1423211µs if (defined $self->{Methods}->{'end_document'}) {
1424 $self->{Methods}->{'end_document'}->(@_);
1425 }
1426 else {
142722µs my $method;
142821µs my $callbacks;
1429210µs if (exists $self->{ParseOptions}) {
1430 $callbacks = $self->{ParseOptions};
1431 }
1432 else {
1433 $callbacks = $self;
1434 }
1435279µs220µs if (0) { # dummy to make elsif's below compile
# spent 20µs making 2 calls to UNIVERSAL::can, avg 10µs/call
1436 }
1437 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('end_document') ) {
1438 my $handler = $callbacks->{'ContentHandler'};
1439 $self->{Methods}->{'end_document'} = sub { $method->($handler, @_) };
1440 return $method->($handler, @_);
1441 }
1442 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('end_document') ) {
1443 my $handler = $callbacks->{'DocumentHandler'};
1444 $self->{Methods}->{'end_document'} = sub { $method->($handler, @_) };
1445 return $method->($handler, @_);
1446 }
1447 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_document') ) {
144827µs my $handler = $callbacks->{'Handler'};
1449247µs $self->{Methods}->{'end_document'} = sub { $method->($handler, @_) };
1450262µs265µs return $method->($handler, @_);
# spent 65µs making 2 calls to XML::Simple::end_document, avg 32µs/call
1451 }
1452 elsif (defined $callbacks->{'ContentHandler'}
1453 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
1454 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1455 )
1456 {
1457 my $res = eval { $callbacks->{'ContentHandler'}->end_document(@_) };
1458 if ($@) {
1459 die $@;
1460 }
1461 else {
1462 # I think there's a buggette here...
1463 # if the first call throws an exception, we don't set it up right.
1464 # Not fatal, but we might want to address it.
1465 my $handler = $callbacks->{'ContentHandler'};
1466 $self->{Methods}->{'end_document'} = sub { $handler->end_document(@_) };
1467 }
1468 return $res;
1469 }
1470 elsif (defined $callbacks->{'DocumentHandler'}
1471 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
1472 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1473 )
1474 {
1475 my $res = eval { $callbacks->{'DocumentHandler'}->end_document(@_) };
1476 if ($@) {
1477 die $@;
1478 }
1479 else {
1480 # I think there's a buggette here...
1481 # if the first call throws an exception, we don't set it up right.
1482 # Not fatal, but we might want to address it.
1483 my $handler = $callbacks->{'DocumentHandler'};
1484 $self->{Methods}->{'end_document'} = sub { $handler->end_document(@_) };
1485 }
1486 return $res;
1487 }
1488 elsif (defined $callbacks->{'Handler'}
1489 and $callbacks->{'Handler'}->can('AUTOLOAD')
1490 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1491 )
1492 {
1493 my $res = eval { $callbacks->{'Handler'}->end_document(@_) };
1494 if ($@) {
1495 die $@;
1496 }
1497 else {
1498 # I think there's a buggette here...
1499 # if the first call throws an exception, we don't set it up right.
1500 # Not fatal, but we might want to address it.
1501 my $handler = $callbacks->{'Handler'};
1502 $self->{Methods}->{'end_document'} = sub { $handler->end_document(@_) };
1503 }
1504 return $res;
1505 }
1506 else {
1507 $self->{Methods}->{'end_document'} = sub { };
1508 }
1509 }
1510
1511}
1512
1513sub start_cdata {
1514 my $self = shift;
1515 if (defined $self->{Methods}->{'start_cdata'}) {
1516 $self->{Methods}->{'start_cdata'}->(@_);
1517 }
1518 else {
1519 my $method;
1520 my $callbacks;
1521 if (exists $self->{ParseOptions}) {
1522 $callbacks = $self->{ParseOptions};
1523 }
1524 else {
1525 $callbacks = $self;
1526 }
1527 if (0) { # dummy to make elsif's below compile
1528 }
1529 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('start_cdata') ) {
1530 my $handler = $callbacks->{'DocumentHandler'};
1531 $self->{Methods}->{'start_cdata'} = sub { $method->($handler, @_) };
1532 return $method->($handler, @_);
1533 }
1534 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('start_cdata') ) {
1535 my $handler = $callbacks->{'LexicalHandler'};
1536 $self->{Methods}->{'start_cdata'} = sub { $method->($handler, @_) };
1537 return $method->($handler, @_);
1538 }
1539 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_cdata') ) {
1540 my $handler = $callbacks->{'Handler'};
1541 $self->{Methods}->{'start_cdata'} = sub { $method->($handler, @_) };
1542 return $method->($handler, @_);
1543 }
1544 elsif (defined $callbacks->{'DocumentHandler'}
1545 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
1546 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1547 )
1548 {
1549 my $res = eval { $callbacks->{'DocumentHandler'}->start_cdata(@_) };
1550 if ($@) {
1551 die $@;
1552 }
1553 else {
1554 # I think there's a buggette here...
1555 # if the first call throws an exception, we don't set it up right.
1556 # Not fatal, but we might want to address it.
1557 my $handler = $callbacks->{'DocumentHandler'};
1558 $self->{Methods}->{'start_cdata'} = sub { $handler->start_cdata(@_) };
1559 }
1560 return $res;
1561 }
1562 elsif (defined $callbacks->{'LexicalHandler'}
1563 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
1564 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1565 )
1566 {
1567 my $res = eval { $callbacks->{'LexicalHandler'}->start_cdata(@_) };
1568 if ($@) {
1569 die $@;
1570 }
1571 else {
1572 # I think there's a buggette here...
1573 # if the first call throws an exception, we don't set it up right.
1574 # Not fatal, but we might want to address it.
1575 my $handler = $callbacks->{'LexicalHandler'};
1576 $self->{Methods}->{'start_cdata'} = sub { $handler->start_cdata(@_) };
1577 }
1578 return $res;
1579 }
1580 elsif (defined $callbacks->{'Handler'}
1581 and $callbacks->{'Handler'}->can('AUTOLOAD')
1582 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1583 )
1584 {
1585 my $res = eval { $callbacks->{'Handler'}->start_cdata(@_) };
1586 if ($@) {
1587 die $@;
1588 }
1589 else {
1590 # I think there's a buggette here...
1591 # if the first call throws an exception, we don't set it up right.
1592 # Not fatal, but we might want to address it.
1593 my $handler = $callbacks->{'Handler'};
1594 $self->{Methods}->{'start_cdata'} = sub { $handler->start_cdata(@_) };
1595 }
1596 return $res;
1597 }
1598 else {
1599 $self->{Methods}->{'start_cdata'} = sub { };
1600 }
1601 }
1602
1603}
1604
1605sub set_document_locator {
1606 my $self = shift;
1607 if (defined $self->{Methods}->{'set_document_locator'}) {
1608 $self->{Methods}->{'set_document_locator'}->(@_);
1609 }
1610 else {
1611 my $method;
1612 my $callbacks;
1613 if (exists $self->{ParseOptions}) {
1614 $callbacks = $self->{ParseOptions};
1615 }
1616 else {
1617 $callbacks = $self;
1618 }
1619 if (0) { # dummy to make elsif's below compile
1620 }
1621 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('set_document_locator') ) {
1622 my $handler = $callbacks->{'ContentHandler'};
1623 $self->{Methods}->{'set_document_locator'} = sub { $method->($handler, @_) };
1624 return $method->($handler, @_);
1625 }
1626 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('set_document_locator') ) {
1627 my $handler = $callbacks->{'DocumentHandler'};
1628 $self->{Methods}->{'set_document_locator'} = sub { $method->($handler, @_) };
1629 return $method->($handler, @_);
1630 }
1631 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('set_document_locator') ) {
1632 my $handler = $callbacks->{'Handler'};
1633 $self->{Methods}->{'set_document_locator'} = sub { $method->($handler, @_) };
1634 return $method->($handler, @_);
1635 }
1636 elsif (defined $callbacks->{'ContentHandler'}
1637 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
1638 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1639 )
1640 {
1641 my $res = eval { $callbacks->{'ContentHandler'}->set_document_locator(@_) };
1642 if ($@) {
1643 die $@;
1644 }
1645 else {
1646 # I think there's a buggette here...
1647 # if the first call throws an exception, we don't set it up right.
1648 # Not fatal, but we might want to address it.
1649 my $handler = $callbacks->{'ContentHandler'};
1650 $self->{Methods}->{'set_document_locator'} = sub { $handler->set_document_locator(@_) };
1651 }
1652 return $res;
1653 }
1654 elsif (defined $callbacks->{'DocumentHandler'}
1655 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
1656 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1657 )
1658 {
1659 my $res = eval { $callbacks->{'DocumentHandler'}->set_document_locator(@_) };
1660 if ($@) {
1661 die $@;
1662 }
1663 else {
1664 # I think there's a buggette here...
1665 # if the first call throws an exception, we don't set it up right.
1666 # Not fatal, but we might want to address it.
1667 my $handler = $callbacks->{'DocumentHandler'};
1668 $self->{Methods}->{'set_document_locator'} = sub { $handler->set_document_locator(@_) };
1669 }
1670 return $res;
1671 }
1672 elsif (defined $callbacks->{'Handler'}
1673 and $callbacks->{'Handler'}->can('AUTOLOAD')
1674 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1675 )
1676 {
1677 my $res = eval { $callbacks->{'Handler'}->set_document_locator(@_) };
1678 if ($@) {
1679 die $@;
1680 }
1681 else {
1682 # I think there's a buggette here...
1683 # if the first call throws an exception, we don't set it up right.
1684 # Not fatal, but we might want to address it.
1685 my $handler = $callbacks->{'Handler'};
1686 $self->{Methods}->{'set_document_locator'} = sub { $handler->set_document_locator(@_) };
1687 }
1688 return $res;
1689 }
1690 else {
1691 $self->{Methods}->{'set_document_locator'} = sub { };
1692 }
1693 }
1694
1695}
1696
1697sub attlist_decl {
1698 my $self = shift;
1699 if (defined $self->{Methods}->{'attlist_decl'}) {
1700 $self->{Methods}->{'attlist_decl'}->(@_);
1701 }
1702 else {
1703 my $method;
1704 my $callbacks;
1705 if (exists $self->{ParseOptions}) {
1706 $callbacks = $self->{ParseOptions};
1707 }
1708 else {
1709 $callbacks = $self;
1710 }
1711 if (0) { # dummy to make elsif's below compile
1712 }
1713 elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('attlist_decl') ) {
1714 my $handler = $callbacks->{'DTDHandler'};
1715 $self->{Methods}->{'attlist_decl'} = sub { $method->($handler, @_) };
1716 return $method->($handler, @_);
1717 }
1718 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('attlist_decl') ) {
1719 my $handler = $callbacks->{'Handler'};
1720 $self->{Methods}->{'attlist_decl'} = sub { $method->($handler, @_) };
1721 return $method->($handler, @_);
1722 }
1723 elsif (defined $callbacks->{'DTDHandler'}
1724 and $callbacks->{'DTDHandler'}->can('AUTOLOAD')
1725 and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1726 )
1727 {
1728 my $res = eval { $callbacks->{'DTDHandler'}->attlist_decl(@_) };
1729 if ($@) {
1730 die $@;
1731 }
1732 else {
1733 # I think there's a buggette here...
1734 # if the first call throws an exception, we don't set it up right.
1735 # Not fatal, but we might want to address it.
1736 my $handler = $callbacks->{'DTDHandler'};
1737 $self->{Methods}->{'attlist_decl'} = sub { $handler->attlist_decl(@_) };
1738 }
1739 return $res;
1740 }
1741 elsif (defined $callbacks->{'Handler'}
1742 and $callbacks->{'Handler'}->can('AUTOLOAD')
1743 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1744 )
1745 {
1746 my $res = eval { $callbacks->{'Handler'}->attlist_decl(@_) };
1747 if ($@) {
1748 die $@;
1749 }
1750 else {
1751 # I think there's a buggette here...
1752 # if the first call throws an exception, we don't set it up right.
1753 # Not fatal, but we might want to address it.
1754 my $handler = $callbacks->{'Handler'};
1755 $self->{Methods}->{'attlist_decl'} = sub { $handler->attlist_decl(@_) };
1756 }
1757 return $res;
1758 }
1759 else {
1760 $self->{Methods}->{'attlist_decl'} = sub { };
1761 }
1762 }
1763
1764}
1765
1766sub start_dtd {
1767 my $self = shift;
1768 if (defined $self->{Methods}->{'start_dtd'}) {
1769 $self->{Methods}->{'start_dtd'}->(@_);
1770 }
1771 else {
1772 my $method;
1773 my $callbacks;
1774 if (exists $self->{ParseOptions}) {
1775 $callbacks = $self->{ParseOptions};
1776 }
1777 else {
1778 $callbacks = $self;
1779 }
1780 if (0) { # dummy to make elsif's below compile
1781 }
1782 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('start_dtd') ) {
1783 my $handler = $callbacks->{'LexicalHandler'};
1784 $self->{Methods}->{'start_dtd'} = sub { $method->($handler, @_) };
1785 return $method->($handler, @_);
1786 }
1787 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('start_dtd') ) {
1788 my $handler = $callbacks->{'Handler'};
1789 $self->{Methods}->{'start_dtd'} = sub { $method->($handler, @_) };
1790 return $method->($handler, @_);
1791 }
1792 elsif (defined $callbacks->{'LexicalHandler'}
1793 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
1794 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1795 )
1796 {
1797 my $res = eval { $callbacks->{'LexicalHandler'}->start_dtd(@_) };
1798 if ($@) {
1799 die $@;
1800 }
1801 else {
1802 # I think there's a buggette here...
1803 # if the first call throws an exception, we don't set it up right.
1804 # Not fatal, but we might want to address it.
1805 my $handler = $callbacks->{'LexicalHandler'};
1806 $self->{Methods}->{'start_dtd'} = sub { $handler->start_dtd(@_) };
1807 }
1808 return $res;
1809 }
1810 elsif (defined $callbacks->{'Handler'}
1811 and $callbacks->{'Handler'}->can('AUTOLOAD')
1812 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1813 )
1814 {
1815 my $res = eval { $callbacks->{'Handler'}->start_dtd(@_) };
1816 if ($@) {
1817 die $@;
1818 }
1819 else {
1820 # I think there's a buggette here...
1821 # if the first call throws an exception, we don't set it up right.
1822 # Not fatal, but we might want to address it.
1823 my $handler = $callbacks->{'Handler'};
1824 $self->{Methods}->{'start_dtd'} = sub { $handler->start_dtd(@_) };
1825 }
1826 return $res;
1827 }
1828 else {
1829 $self->{Methods}->{'start_dtd'} = sub { };
1830 }
1831 }
1832
1833}
1834
1835sub resolve_entity {
1836 my $self = shift;
1837 if (defined $self->{Methods}->{'resolve_entity'}) {
1838 $self->{Methods}->{'resolve_entity'}->(@_);
1839 }
1840 else {
1841 my $method;
1842 my $callbacks;
1843 if (exists $self->{ParseOptions}) {
1844 $callbacks = $self->{ParseOptions};
1845 }
1846 else {
1847 $callbacks = $self;
1848 }
1849 if (0) { # dummy to make elsif's below compile
1850 }
1851 elsif (defined $callbacks->{'EntityResolver'} and $method = $callbacks->{'EntityResolver'}->can('resolve_entity') ) {
1852 my $handler = $callbacks->{'EntityResolver'};
1853 $self->{Methods}->{'resolve_entity'} = sub { $method->($handler, @_) };
1854 return $method->($handler, @_);
1855 }
1856 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('resolve_entity') ) {
1857 my $handler = $callbacks->{'Handler'};
1858 $self->{Methods}->{'resolve_entity'} = sub { $method->($handler, @_) };
1859 return $method->($handler, @_);
1860 }
1861 elsif (defined $callbacks->{'EntityResolver'}
1862 and $callbacks->{'EntityResolver'}->can('AUTOLOAD')
1863 and $callbacks->{'EntityResolver'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1864 )
1865 {
1866 my $res = eval { $callbacks->{'EntityResolver'}->resolve_entity(@_) };
1867 if ($@) {
1868 die $@;
1869 }
1870 else {
1871 # I think there's a buggette here...
1872 # if the first call throws an exception, we don't set it up right.
1873 # Not fatal, but we might want to address it.
1874 my $handler = $callbacks->{'EntityResolver'};
1875 $self->{Methods}->{'resolve_entity'} = sub { $handler->resolve_entity(@_) };
1876 }
1877 return $res;
1878 }
1879 elsif (defined $callbacks->{'Handler'}
1880 and $callbacks->{'Handler'}->can('AUTOLOAD')
1881 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1882 )
1883 {
1884 my $res = eval { $callbacks->{'Handler'}->resolve_entity(@_) };
1885 if ($@) {
1886 die $@;
1887 }
1888 else {
1889 # I think there's a buggette here...
1890 # if the first call throws an exception, we don't set it up right.
1891 # Not fatal, but we might want to address it.
1892 my $handler = $callbacks->{'Handler'};
1893 $self->{Methods}->{'resolve_entity'} = sub { $handler->resolve_entity(@_) };
1894 }
1895 return $res;
1896 }
1897 else {
1898 $self->{Methods}->{'resolve_entity'} = sub { };
1899 }
1900 }
1901
1902}
1903
1904sub entity_reference {
1905 my $self = shift;
1906 if (defined $self->{Methods}->{'entity_reference'}) {
1907 $self->{Methods}->{'entity_reference'}->(@_);
1908 }
1909 else {
1910 my $method;
1911 my $callbacks;
1912 if (exists $self->{ParseOptions}) {
1913 $callbacks = $self->{ParseOptions};
1914 }
1915 else {
1916 $callbacks = $self;
1917 }
1918 if (0) { # dummy to make elsif's below compile
1919 }
1920 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('entity_reference') ) {
1921 my $handler = $callbacks->{'DocumentHandler'};
1922 $self->{Methods}->{'entity_reference'} = sub { $method->($handler, @_) };
1923 return $method->($handler, @_);
1924 }
1925 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('entity_reference') ) {
1926 my $handler = $callbacks->{'Handler'};
1927 $self->{Methods}->{'entity_reference'} = sub { $method->($handler, @_) };
1928 return $method->($handler, @_);
1929 }
1930 elsif (defined $callbacks->{'DocumentHandler'}
1931 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
1932 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1933 )
1934 {
1935 my $res = eval { $callbacks->{'DocumentHandler'}->entity_reference(@_) };
1936 if ($@) {
1937 die $@;
1938 }
1939 else {
1940 # I think there's a buggette here...
1941 # if the first call throws an exception, we don't set it up right.
1942 # Not fatal, but we might want to address it.
1943 my $handler = $callbacks->{'DocumentHandler'};
1944 $self->{Methods}->{'entity_reference'} = sub { $handler->entity_reference(@_) };
1945 }
1946 return $res;
1947 }
1948 elsif (defined $callbacks->{'Handler'}
1949 and $callbacks->{'Handler'}->can('AUTOLOAD')
1950 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
1951 )
1952 {
1953 my $res = eval { $callbacks->{'Handler'}->entity_reference(@_) };
1954 if ($@) {
1955 die $@;
1956 }
1957 else {
1958 # I think there's a buggette here...
1959 # if the first call throws an exception, we don't set it up right.
1960 # Not fatal, but we might want to address it.
1961 my $handler = $callbacks->{'Handler'};
1962 $self->{Methods}->{'entity_reference'} = sub { $handler->entity_reference(@_) };
1963 }
1964 return $res;
1965 }
1966 else {
1967 $self->{Methods}->{'entity_reference'} = sub { };
1968 }
1969 }
1970
1971}
1972
1973sub element_decl {
1974 my $self = shift;
1975 if (defined $self->{Methods}->{'element_decl'}) {
1976 $self->{Methods}->{'element_decl'}->(@_);
1977 }
1978 else {
1979 my $method;
1980 my $callbacks;
1981 if (exists $self->{ParseOptions}) {
1982 $callbacks = $self->{ParseOptions};
1983 }
1984 else {
1985 $callbacks = $self;
1986 }
1987 if (0) { # dummy to make elsif's below compile
1988 }
1989 elsif (defined $callbacks->{'DeclHandler'} and $method = $callbacks->{'DeclHandler'}->can('element_decl') ) {
1990 my $handler = $callbacks->{'DeclHandler'};
1991 $self->{Methods}->{'element_decl'} = sub { $method->($handler, @_) };
1992 return $method->($handler, @_);
1993 }
1994 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('element_decl') ) {
1995 my $handler = $callbacks->{'Handler'};
1996 $self->{Methods}->{'element_decl'} = sub { $method->($handler, @_) };
1997 return $method->($handler, @_);
1998 }
1999 elsif (defined $callbacks->{'DeclHandler'}
2000 and $callbacks->{'DeclHandler'}->can('AUTOLOAD')
2001 and $callbacks->{'DeclHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2002 )
2003 {
2004 my $res = eval { $callbacks->{'DeclHandler'}->element_decl(@_) };
2005 if ($@) {
2006 die $@;
2007 }
2008 else {
2009 # I think there's a buggette here...
2010 # if the first call throws an exception, we don't set it up right.
2011 # Not fatal, but we might want to address it.
2012 my $handler = $callbacks->{'DeclHandler'};
2013 $self->{Methods}->{'element_decl'} = sub { $handler->element_decl(@_) };
2014 }
2015 return $res;
2016 }
2017 elsif (defined $callbacks->{'Handler'}
2018 and $callbacks->{'Handler'}->can('AUTOLOAD')
2019 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2020 )
2021 {
2022 my $res = eval { $callbacks->{'Handler'}->element_decl(@_) };
2023 if ($@) {
2024 die $@;
2025 }
2026 else {
2027 # I think there's a buggette here...
2028 # if the first call throws an exception, we don't set it up right.
2029 # Not fatal, but we might want to address it.
2030 my $handler = $callbacks->{'Handler'};
2031 $self->{Methods}->{'element_decl'} = sub { $handler->element_decl(@_) };
2032 }
2033 return $res;
2034 }
2035 else {
2036 $self->{Methods}->{'element_decl'} = sub { };
2037 }
2038 }
2039
2040}
2041
2042sub notation_decl {
2043 my $self = shift;
2044 if (defined $self->{Methods}->{'notation_decl'}) {
2045 $self->{Methods}->{'notation_decl'}->(@_);
2046 }
2047 else {
2048 my $method;
2049 my $callbacks;
2050 if (exists $self->{ParseOptions}) {
2051 $callbacks = $self->{ParseOptions};
2052 }
2053 else {
2054 $callbacks = $self;
2055 }
2056 if (0) { # dummy to make elsif's below compile
2057 }
2058 elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('notation_decl') ) {
2059 my $handler = $callbacks->{'DTDHandler'};
2060 $self->{Methods}->{'notation_decl'} = sub { $method->($handler, @_) };
2061 return $method->($handler, @_);
2062 }
2063 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('notation_decl') ) {
2064 my $handler = $callbacks->{'Handler'};
2065 $self->{Methods}->{'notation_decl'} = sub { $method->($handler, @_) };
2066 return $method->($handler, @_);
2067 }
2068 elsif (defined $callbacks->{'DTDHandler'}
2069 and $callbacks->{'DTDHandler'}->can('AUTOLOAD')
2070 and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2071 )
2072 {
2073 my $res = eval { $callbacks->{'DTDHandler'}->notation_decl(@_) };
2074 if ($@) {
2075 die $@;
2076 }
2077 else {
2078 # I think there's a buggette here...
2079 # if the first call throws an exception, we don't set it up right.
2080 # Not fatal, but we might want to address it.
2081 my $handler = $callbacks->{'DTDHandler'};
2082 $self->{Methods}->{'notation_decl'} = sub { $handler->notation_decl(@_) };
2083 }
2084 return $res;
2085 }
2086 elsif (defined $callbacks->{'Handler'}
2087 and $callbacks->{'Handler'}->can('AUTOLOAD')
2088 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2089 )
2090 {
2091 my $res = eval { $callbacks->{'Handler'}->notation_decl(@_) };
2092 if ($@) {
2093 die $@;
2094 }
2095 else {
2096 # I think there's a buggette here...
2097 # if the first call throws an exception, we don't set it up right.
2098 # Not fatal, but we might want to address it.
2099 my $handler = $callbacks->{'Handler'};
2100 $self->{Methods}->{'notation_decl'} = sub { $handler->notation_decl(@_) };
2101 }
2102 return $res;
2103 }
2104 else {
2105 $self->{Methods}->{'notation_decl'} = sub { };
2106 }
2107 }
2108
2109}
2110
2111sub skipped_entity {
2112 my $self = shift;
2113 if (defined $self->{Methods}->{'skipped_entity'}) {
2114 $self->{Methods}->{'skipped_entity'}->(@_);
2115 }
2116 else {
2117 my $method;
2118 my $callbacks;
2119 if (exists $self->{ParseOptions}) {
2120 $callbacks = $self->{ParseOptions};
2121 }
2122 else {
2123 $callbacks = $self;
2124 }
2125 if (0) { # dummy to make elsif's below compile
2126 }
2127 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('skipped_entity') ) {
2128 my $handler = $callbacks->{'ContentHandler'};
2129 $self->{Methods}->{'skipped_entity'} = sub { $method->($handler, @_) };
2130 return $method->($handler, @_);
2131 }
2132 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('skipped_entity') ) {
2133 my $handler = $callbacks->{'Handler'};
2134 $self->{Methods}->{'skipped_entity'} = sub { $method->($handler, @_) };
2135 return $method->($handler, @_);
2136 }
2137 elsif (defined $callbacks->{'ContentHandler'}
2138 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
2139 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2140 )
2141 {
2142 my $res = eval { $callbacks->{'ContentHandler'}->skipped_entity(@_) };
2143 if ($@) {
2144 die $@;
2145 }
2146 else {
2147 # I think there's a buggette here...
2148 # if the first call throws an exception, we don't set it up right.
2149 # Not fatal, but we might want to address it.
2150 my $handler = $callbacks->{'ContentHandler'};
2151 $self->{Methods}->{'skipped_entity'} = sub { $handler->skipped_entity(@_) };
2152 }
2153 return $res;
2154 }
2155 elsif (defined $callbacks->{'Handler'}
2156 and $callbacks->{'Handler'}->can('AUTOLOAD')
2157 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2158 )
2159 {
2160 my $res = eval { $callbacks->{'Handler'}->skipped_entity(@_) };
2161 if ($@) {
2162 die $@;
2163 }
2164 else {
2165 # I think there's a buggette here...
2166 # if the first call throws an exception, we don't set it up right.
2167 # Not fatal, but we might want to address it.
2168 my $handler = $callbacks->{'Handler'};
2169 $self->{Methods}->{'skipped_entity'} = sub { $handler->skipped_entity(@_) };
2170 }
2171 return $res;
2172 }
2173 else {
2174 $self->{Methods}->{'skipped_entity'} = sub { };
2175 }
2176 }
2177
2178}
2179
2180
# spent 7.75ms (3.32+4.43) within XML::SAX::Base::end_element which was called 132 times, avg 59µs/call: # 132 times (3.32ms+4.43ms) by XML::LibXML::_parse_sax_string at line 833 of XML/LibXML.pm, avg 59µs/call
sub end_element {
2181132280µs my $self = shift;
218213232.8ms1304.38ms if (defined $self->{Methods}->{'end_element'}) {
# spent 4.38ms making 130 calls to XML::SAX::Base::__ANON__[XML/SAX/Base.pm:2208], avg 34µs/call
2183 $self->{Methods}->{'end_element'}->(@_);
2184 }
2185 else {
218621µs my $method;
218721µs my $callbacks;
218827µs if (exists $self->{ParseOptions}) {
2189 $callbacks = $self->{ParseOptions};
2190 }
2191 else {
2192 $callbacks = $self;
2193 }
2194270µs217µs if (0) { # dummy to make elsif's below compile
# spent 17µs making 2 calls to UNIVERSAL::can, avg 9µs/call
2195 }
2196 elsif (defined $callbacks->{'ContentHandler'} and $method = $callbacks->{'ContentHandler'}->can('end_element') ) {
2197 my $handler = $callbacks->{'ContentHandler'};
2198 $self->{Methods}->{'end_element'} = sub { $method->($handler, @_) };
2199 return $method->($handler, @_);
2200 }
2201 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('end_element') ) {
2202 my $handler = $callbacks->{'DocumentHandler'};
2203 $self->{Methods}->{'end_element'} = sub { $method->($handler, @_) };
2204 return $method->($handler, @_);
2205 }
2206 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_element') ) {
220726µs my $handler = $callbacks->{'Handler'};
22081322.32ms1301.55ms
# spent 4.38ms (2.83+1.55) within XML::SAX::Base::__ANON__[/usr/lib64/perl5/vendor_perl/5.16.0/XML/SAX/Base.pm:2208] which was called 130 times, avg 34µs/call: # 130 times (2.83ms+1.55ms) by XML::SAX::Base::end_element at line 2182, avg 34µs/call
$self->{Methods}->{'end_element'} = sub { $method->($handler, @_) };
# spent 1.55ms making 130 calls to XML::Simple::end_element, avg 12µs/call
2209253µs231µs return $method->($handler, @_);
# spent 31µs making 2 calls to XML::Simple::end_element, avg 16µs/call
2210 }
2211 elsif (defined $callbacks->{'ContentHandler'}
2212 and $callbacks->{'ContentHandler'}->can('AUTOLOAD')
2213 and $callbacks->{'ContentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2214 )
2215 {
2216 my $res = eval { $callbacks->{'ContentHandler'}->end_element(@_) };
2217 if ($@) {
2218 die $@;
2219 }
2220 else {
2221 # I think there's a buggette here...
2222 # if the first call throws an exception, we don't set it up right.
2223 # Not fatal, but we might want to address it.
2224 my $handler = $callbacks->{'ContentHandler'};
2225 $self->{Methods}->{'end_element'} = sub { $handler->end_element(@_) };
2226 }
2227 return $res;
2228 }
2229 elsif (defined $callbacks->{'DocumentHandler'}
2230 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
2231 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2232 )
2233 {
2234 my $res = eval { $callbacks->{'DocumentHandler'}->end_element(@_) };
2235 if ($@) {
2236 die $@;
2237 }
2238 else {
2239 # I think there's a buggette here...
2240 # if the first call throws an exception, we don't set it up right.
2241 # Not fatal, but we might want to address it.
2242 my $handler = $callbacks->{'DocumentHandler'};
2243 $self->{Methods}->{'end_element'} = sub { $handler->end_element(@_) };
2244 }
2245 return $res;
2246 }
2247 elsif (defined $callbacks->{'Handler'}
2248 and $callbacks->{'Handler'}->can('AUTOLOAD')
2249 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2250 )
2251 {
2252 my $res = eval { $callbacks->{'Handler'}->end_element(@_) };
2253 if ($@) {
2254 die $@;
2255 }
2256 else {
2257 # I think there's a buggette here...
2258 # if the first call throws an exception, we don't set it up right.
2259 # Not fatal, but we might want to address it.
2260 my $handler = $callbacks->{'Handler'};
2261 $self->{Methods}->{'end_element'} = sub { $handler->end_element(@_) };
2262 }
2263 return $res;
2264 }
2265 else {
2266 $self->{Methods}->{'end_element'} = sub { };
2267 }
2268 }
2269
2270}
2271
2272sub doctype_decl {
2273 my $self = shift;
2274 if (defined $self->{Methods}->{'doctype_decl'}) {
2275 $self->{Methods}->{'doctype_decl'}->(@_);
2276 }
2277 else {
2278 my $method;
2279 my $callbacks;
2280 if (exists $self->{ParseOptions}) {
2281 $callbacks = $self->{ParseOptions};
2282 }
2283 else {
2284 $callbacks = $self;
2285 }
2286 if (0) { # dummy to make elsif's below compile
2287 }
2288 elsif (defined $callbacks->{'DTDHandler'} and $method = $callbacks->{'DTDHandler'}->can('doctype_decl') ) {
2289 my $handler = $callbacks->{'DTDHandler'};
2290 $self->{Methods}->{'doctype_decl'} = sub { $method->($handler, @_) };
2291 return $method->($handler, @_);
2292 }
2293 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('doctype_decl') ) {
2294 my $handler = $callbacks->{'Handler'};
2295 $self->{Methods}->{'doctype_decl'} = sub { $method->($handler, @_) };
2296 return $method->($handler, @_);
2297 }
2298 elsif (defined $callbacks->{'DTDHandler'}
2299 and $callbacks->{'DTDHandler'}->can('AUTOLOAD')
2300 and $callbacks->{'DTDHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2301 )
2302 {
2303 my $res = eval { $callbacks->{'DTDHandler'}->doctype_decl(@_) };
2304 if ($@) {
2305 die $@;
2306 }
2307 else {
2308 # I think there's a buggette here...
2309 # if the first call throws an exception, we don't set it up right.
2310 # Not fatal, but we might want to address it.
2311 my $handler = $callbacks->{'DTDHandler'};
2312 $self->{Methods}->{'doctype_decl'} = sub { $handler->doctype_decl(@_) };
2313 }
2314 return $res;
2315 }
2316 elsif (defined $callbacks->{'Handler'}
2317 and $callbacks->{'Handler'}->can('AUTOLOAD')
2318 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2319 )
2320 {
2321 my $res = eval { $callbacks->{'Handler'}->doctype_decl(@_) };
2322 if ($@) {
2323 die $@;
2324 }
2325 else {
2326 # I think there's a buggette here...
2327 # if the first call throws an exception, we don't set it up right.
2328 # Not fatal, but we might want to address it.
2329 my $handler = $callbacks->{'Handler'};
2330 $self->{Methods}->{'doctype_decl'} = sub { $handler->doctype_decl(@_) };
2331 }
2332 return $res;
2333 }
2334 else {
2335 $self->{Methods}->{'doctype_decl'} = sub { };
2336 }
2337 }
2338
2339}
2340
2341
# spent 2.18ms (1.74+442µs) within XML::SAX::Base::comment which was called 60 times, avg 36µs/call: # 60 times (1.74ms+442µs) by XML::LibXML::_parse_sax_string at line 833 of XML/LibXML.pm, avg 36µs/call
sub comment {
234260116µs my $self = shift;
2343601.35ms58400µs if (defined $self->{Methods}->{'comment'}) {
# spent 400µs making 58 calls to XML::SAX::Base::__ANON__[XML/SAX/Base.pm:2427], avg 7µs/call
2344 $self->{Methods}->{'comment'}->(@_);
2345 }
2346 else {
234722µs my $method;
234821µs my $callbacks;
234927µs if (exists $self->{ParseOptions}) {
2350 $callbacks = $self->{ParseOptions};
2351 }
2352 else {
2353 $callbacks = $self;
2354 }
23552135µs442µs if (0) { # dummy to make elsif's below compile
# spent 42µs making 4 calls to UNIVERSAL::can, avg 10µs/call
2356 }
2357 elsif (defined $callbacks->{'DocumentHandler'} and $method = $callbacks->{'DocumentHandler'}->can('comment') ) {
2358 my $handler = $callbacks->{'DocumentHandler'};
2359 $self->{Methods}->{'comment'} = sub { $method->($handler, @_) };
2360 return $method->($handler, @_);
2361 }
2362 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('comment') ) {
2363 my $handler = $callbacks->{'LexicalHandler'};
2364 $self->{Methods}->{'comment'} = sub { $method->($handler, @_) };
2365 return $method->($handler, @_);
2366 }
2367 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('comment') ) {
2368 my $handler = $callbacks->{'Handler'};
2369 $self->{Methods}->{'comment'} = sub { $method->($handler, @_) };
2370 return $method->($handler, @_);
2371 }
2372 elsif (defined $callbacks->{'DocumentHandler'}
2373 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD')
2374 and $callbacks->{'DocumentHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2375 )
2376 {
2377 my $res = eval { $callbacks->{'DocumentHandler'}->comment(@_) };
2378 if ($@) {
2379 die $@;
2380 }
2381 else {
2382 # I think there's a buggette here...
2383 # if the first call throws an exception, we don't set it up right.
2384 # Not fatal, but we might want to address it.
2385 my $handler = $callbacks->{'DocumentHandler'};
2386 $self->{Methods}->{'comment'} = sub { $handler->comment(@_) };
2387 }
2388 return $res;
2389 }
2390 elsif (defined $callbacks->{'LexicalHandler'}
2391 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
2392 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2393 )
2394 {
2395 my $res = eval { $callbacks->{'LexicalHandler'}->comment(@_) };
2396 if ($@) {
2397 die $@;
2398 }
2399 else {
2400 # I think there's a buggette here...
2401 # if the first call throws an exception, we don't set it up right.
2402 # Not fatal, but we might want to address it.
2403 my $handler = $callbacks->{'LexicalHandler'};
2404 $self->{Methods}->{'comment'} = sub { $handler->comment(@_) };
2405 }
2406 return $res;
2407 }
2408 elsif (defined $callbacks->{'Handler'}
2409 and $callbacks->{'Handler'}->can('AUTOLOAD')
2410 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2411 )
2412 {
2413 my $res = eval { $callbacks->{'Handler'}->comment(@_) };
2414 if ($@) {
2415 die $@;
2416 }
2417 else {
2418 # I think there's a buggette here...
2419 # if the first call throws an exception, we don't set it up right.
2420 # Not fatal, but we might want to address it.
2421 my $handler = $callbacks->{'Handler'};
2422 $self->{Methods}->{'comment'} = sub { $handler->comment(@_) };
2423 }
2424 return $res;
2425 }
2426 else {
242760794µs
# spent 400µs within XML::SAX::Base::__ANON__[/usr/lib64/perl5/vendor_perl/5.16.0/XML/SAX/Base.pm:2427] which was called 58 times, avg 7µs/call: # 58 times (400µs+0s) by XML::SAX::Base::comment at line 2343, avg 7µs/call
$self->{Methods}->{'comment'} = sub { };
2428 }
2429 }
2430
2431}
2432
2433sub end_entity {
2434 my $self = shift;
2435 if (defined $self->{Methods}->{'end_entity'}) {
2436 $self->{Methods}->{'end_entity'}->(@_);
2437 }
2438 else {
2439 my $method;
2440 my $callbacks;
2441 if (exists $self->{ParseOptions}) {
2442 $callbacks = $self->{ParseOptions};
2443 }
2444 else {
2445 $callbacks = $self;
2446 }
2447 if (0) { # dummy to make elsif's below compile
2448 }
2449 elsif (defined $callbacks->{'LexicalHandler'} and $method = $callbacks->{'LexicalHandler'}->can('end_entity') ) {
2450 my $handler = $callbacks->{'LexicalHandler'};
2451 $self->{Methods}->{'end_entity'} = sub { $method->($handler, @_) };
2452 return $method->($handler, @_);
2453 }
2454 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('end_entity') ) {
2455 my $handler = $callbacks->{'Handler'};
2456 $self->{Methods}->{'end_entity'} = sub { $method->($handler, @_) };
2457 return $method->($handler, @_);
2458 }
2459 elsif (defined $callbacks->{'LexicalHandler'}
2460 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD')
2461 and $callbacks->{'LexicalHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2462 )
2463 {
2464 my $res = eval { $callbacks->{'LexicalHandler'}->end_entity(@_) };
2465 if ($@) {
2466 die $@;
2467 }
2468 else {
2469 # I think there's a buggette here...
2470 # if the first call throws an exception, we don't set it up right.
2471 # Not fatal, but we might want to address it.
2472 my $handler = $callbacks->{'LexicalHandler'};
2473 $self->{Methods}->{'end_entity'} = sub { $handler->end_entity(@_) };
2474 }
2475 return $res;
2476 }
2477 elsif (defined $callbacks->{'Handler'}
2478 and $callbacks->{'Handler'}->can('AUTOLOAD')
2479 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2480 )
2481 {
2482 my $res = eval { $callbacks->{'Handler'}->end_entity(@_) };
2483 if ($@) {
2484 die $@;
2485 }
2486 else {
2487 # I think there's a buggette here...
2488 # if the first call throws an exception, we don't set it up right.
2489 # Not fatal, but we might want to address it.
2490 my $handler = $callbacks->{'Handler'};
2491 $self->{Methods}->{'end_entity'} = sub { $handler->end_entity(@_) };
2492 }
2493 return $res;
2494 }
2495 else {
2496 $self->{Methods}->{'end_entity'} = sub { };
2497 }
2498 }
2499
2500}
2501
2502sub warning {
2503 my $self = shift;
2504 if (defined $self->{Methods}->{'warning'}) {
2505 $self->{Methods}->{'warning'}->(@_);
2506 }
2507 else {
2508 my $method;
2509 my $callbacks;
2510 if (exists $self->{ParseOptions}) {
2511 $callbacks = $self->{ParseOptions};
2512 }
2513 else {
2514 $callbacks = $self;
2515 }
2516 if (0) { # dummy to make elsif's below compile
2517 }
2518 elsif (defined $callbacks->{'ErrorHandler'} and $method = $callbacks->{'ErrorHandler'}->can('warning') ) {
2519 my $handler = $callbacks->{'ErrorHandler'};
2520 $self->{Methods}->{'warning'} = sub { $method->($handler, @_) };
2521 return $method->($handler, @_);
2522 }
2523 elsif (defined $callbacks->{'Handler'} and $method = $callbacks->{'Handler'}->can('warning') ) {
2524 my $handler = $callbacks->{'Handler'};
2525 $self->{Methods}->{'warning'} = sub { $method->($handler, @_) };
2526 return $method->($handler, @_);
2527 }
2528 elsif (defined $callbacks->{'ErrorHandler'}
2529 and $callbacks->{'ErrorHandler'}->can('AUTOLOAD')
2530 and $callbacks->{'ErrorHandler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2531 )
2532 {
2533 my $res = eval { $callbacks->{'ErrorHandler'}->warning(@_) };
2534 if ($@) {
2535 die $@;
2536 }
2537 else {
2538 # I think there's a buggette here...
2539 # if the first call throws an exception, we don't set it up right.
2540 # Not fatal, but we might want to address it.
2541 my $handler = $callbacks->{'ErrorHandler'};
2542 $self->{Methods}->{'warning'} = sub { $handler->warning(@_) };
2543 }
2544 return $res;
2545 }
2546 elsif (defined $callbacks->{'Handler'}
2547 and $callbacks->{'Handler'}->can('AUTOLOAD')
2548 and $callbacks->{'Handler'}->can('AUTOLOAD') ne (UNIVERSAL->can('AUTOLOAD') || '')
2549 )
2550 {
2551 my $res = eval { $callbacks->{'Handler'}->warning(@_) };
2552 if ($@) {
2553 die $@;
2554 }
2555 else {
2556 # I think there's a buggette here...
2557 # if the first call throws an exception, we don't set it up right.
2558 # Not fatal, but we might want to address it.
2559 my $handler = $callbacks->{'Handler'};
2560 $self->{Methods}->{'warning'} = sub { $handler->warning(@_) };
2561 }
2562 return $res;
2563 }
2564 else {
2565 $self->{Methods}->{'warning'} = sub { };
2566 }
2567 }
2568
2569}
2570
2571#-------------------------------------------------------------------#
2572# Class->new(%options)
2573#-------------------------------------------------------------------#
2574
# spent 693µs (152+541) within XML::SAX::Base::new which was called 2 times, avg 346µs/call: # 2 times (152µs+541µs) by XML::SAX::ParserFactory::parser at line 41 of XML/SAX/ParserFactory.pm, avg 346µs/call
sub new {
257529µs my $proto = shift;
257625µs my $class = ref($proto) || $proto;
2577221µs my $options = ($#_ == 0) ? shift : { @_ };
2578
257926µs unless ( defined( $options->{Handler} ) or
2580 defined( $options->{ContentHandler} ) or
2581 defined( $options->{DTDHandler} ) or
2582 defined( $options->{DocumentHandler} ) or
2583 defined( $options->{LexicalHandler} ) or
2584 defined( $options->{ErrorHandler} ) or
2585 defined( $options->{DeclHandler} ) ) {
2586
2587 $options->{Handler} = XML::SAX::Base::NoHandler->new;
2588 }
2589
2590241µs my $self = bless $options, $class;
2591 # turn NS processing on by default
2592224µs2541µs $self->set_feature('http://xml.org/sax/features/namespaces', 1);
# spent 541µs making 2 calls to XML::LibXML::SAX::set_feature, avg 271µs/call
2593252µs return $self;
2594}
2595#-------------------------------------------------------------------#
2596
2597#-------------------------------------------------------------------#
2598# $p->parse(%options)
2599#-------------------------------------------------------------------#
2600
# spent 134ms (200µs+134) within XML::SAX::Base::parse which was called 2 times, avg 67.2ms/call: # 2 times (200µs+134ms) by XML::SAX::Base::parse_string at line 2662, avg 67.2ms/call
sub parse {
260125µs my $self = shift;
2602223µs245µs my $parse_options = $self->get_options(@_);
# spent 45µs making 2 calls to XML::SAX::Base::get_options, avg 23µs/call
2603210µs local $self->{ParseOptions} = $parse_options;
260426µs if ($self->{Parent}) { # calling parse on a filter for some reason
2605 return $self->{Parent}->parse($parse_options);
2606 }
2607 else {
260822µs my $method;
26092189µs4134ms if (defined $parse_options->{Source}{CharacterStream} and $method = $self->can('_parse_characterstream')) {
# spent 134ms making 2 calls to XML::LibXML::SAX::_parse_string, avg 67.1ms/call # spent 22µs making 2 calls to UNIVERSAL::can, avg 11µs/call
2610 warn("parse charstream???\n");
2611 return $method->($self, $parse_options->{Source}{CharacterStream});
2612 }
2613 elsif (defined $parse_options->{Source}{ByteStream} and $method = $self->can('_parse_bytestream')) {
2614 return $method->($self, $parse_options->{Source}{ByteStream});
2615 }
2616 elsif (defined $parse_options->{Source}{String} and $method = $self->can('_parse_string')) {
2617 return $method->($self, $parse_options->{Source}{String});
2618 }
2619 elsif (defined $parse_options->{Source}{SystemId} and $method = $self->can('_parse_systemid')) {
2620 return $method->($self, $parse_options->{Source}{SystemId});
2621 }
2622 else {
2623 die "No _parse_* routine defined on this driver (If it is a filter, remember to set the Parent property. If you call the parse() method, make sure to set a Source. You may want to call parse_uri, parse_string or parse_file instead.) [$self]";
2624 }
2625 }
2626}
2627#-------------------------------------------------------------------#
2628
2629#-------------------------------------------------------------------#
2630# $p->parse_file(%options)
2631#-------------------------------------------------------------------#
2632sub parse_file {
2633 my $self = shift;
2634 my $file = shift;
2635 return $self->parse_uri($file, @_) if ref(\$file) eq 'SCALAR';
2636 my $parse_options = $self->get_options(@_);
2637 $parse_options->{Source}{ByteStream} = $file;
2638 return $self->parse($parse_options);
2639}
2640#-------------------------------------------------------------------#
2641
2642#-------------------------------------------------------------------#
2643# $p->parse_uri(%options)
2644#-------------------------------------------------------------------#
2645sub parse_uri {
2646 my $self = shift;
2647 my $file = shift;
2648 my $parse_options = $self->get_options(@_);
2649 $parse_options->{Source}{SystemId} = $file;
2650 return $self->parse($parse_options);
2651}
2652#-------------------------------------------------------------------#
2653
2654#-------------------------------------------------------------------#
2655# $p->parse_string(%options)
2656#-------------------------------------------------------------------#
2657
# spent 135ms (249µs+135) within XML::SAX::Base::parse_string which was called 2 times, avg 67.4ms/call: # 2 times (249µs+135ms) by XML::Simple::build_tree at line 391 of XML/Simple.pm, avg 67.4ms/call
sub parse_string {
265826µs my $self = shift;
2659229µs my $string = shift;
2660239µs253µs my $parse_options = $self->get_options(@_);
# spent 53µs making 2 calls to XML::SAX::Base::get_options, avg 26µs/call
2661238µs $parse_options->{Source}{String} = $string;
2662284µs2134ms return $self->parse($parse_options);
# spent 134ms making 2 calls to XML::SAX::Base::parse, avg 67.2ms/call
2663}
2664#-------------------------------------------------------------------#
2665
2666#-------------------------------------------------------------------#
2667# get_options
2668#-------------------------------------------------------------------#
2669
# spent 98µs within XML::SAX::Base::get_options which was called 4 times, avg 25µs/call: # 2 times (53µs+0s) by XML::SAX::Base::parse_string at line 2660, avg 26µs/call # 2 times (45µs+0s) by XML::SAX::Base::parse at line 2602, avg 23µs/call
sub get_options {
267046µs my $self = shift;
2671
2672469µs if (@_ == 1) {
2673 return { %$self, %{$_[0]} };
2674 } else {
2675266µs return { %$self, @_ };
2676 }
2677}
2678#-------------------------------------------------------------------#
2679
2680#-------------------------------------------------------------------#
2681# get_features
2682#-------------------------------------------------------------------#
2683
# spent 54µs within XML::SAX::Base::get_features which was called 2 times, avg 27µs/call: # 2 times (54µs+0s) by XML::SAX::Base::set_feature at line 2745, avg 27µs/call
sub get_features {
2684 return (
2685288µs 'http://xml.org/sax/features/external-general-entities' => undef,
2686 'http://xml.org/sax/features/external-parameter-entities' => undef,
2687 'http://xml.org/sax/features/is-standalone' => undef,
2688 'http://xml.org/sax/features/lexical-handler' => undef,
2689 'http://xml.org/sax/features/parameter-entities' => undef,
2690 'http://xml.org/sax/features/namespaces' => 1,
2691 'http://xml.org/sax/features/namespace-prefixes' => 0,
2692 'http://xml.org/sax/features/string-interning' => undef,
2693 'http://xml.org/sax/features/use-attributes2' => undef,
2694 'http://xml.org/sax/features/use-locator2' => undef,
2695 'http://xml.org/sax/features/validation' => undef,
2696
2697 'http://xml.org/sax/properties/dom-node' => undef,
2698 'http://xml.org/sax/properties/xml-string' => undef,
2699 );
2700}
2701#-------------------------------------------------------------------#
2702
2703#-------------------------------------------------------------------#
2704# get_feature
2705#-------------------------------------------------------------------#
2706sub get_feature {
2707 my $self = shift;
2708 my $feat = shift;
2709
2710 # check %FEATURES to see if it's there, and return it if so
2711 # throw XML::SAX::Exception::NotRecognized if it's not there
2712 # throw XML::SAX::Exception::NotSupported if it's there but we
2713 # don't support it
2714
2715 my %features = $self->get_features();
2716 if (exists $features{$feat}) {
2717 my %supported = map { $_ => 1 } $self->supported_features();
2718 if ($supported{$feat}) {
2719 return $self->{__PACKAGE__ . "::Features"}{$feat};
2720 }
2721 throw XML::SAX::Exception::NotSupported(
2722 Message => "The feature '$feat' is not supported by " . ref($self),
2723 Exception => undef,
2724 );
2725 }
2726 throw XML::SAX::Exception::NotRecognized(
2727 Message => "The feature '$feat' is not recognized by " . ref($self),
2728 Exception => undef,
2729 );
2730}
2731#-------------------------------------------------------------------#
2732
2733#-------------------------------------------------------------------#
2734# set_feature
2735#-------------------------------------------------------------------#
2736
# spent 382µs (300+82) within XML::SAX::Base::set_feature which was called 2 times, avg 191µs/call: # 2 times (300µs+82µs) by XML::LibXML::SAX::set_feature at line 38 of XML/LibXML/SAX.pm, avg 191µs/call
sub set_feature {
273725µs my $self = shift;
273824µs my $feat = shift;
273922µs my $value = shift;
2740 # check %FEATURES to see if it's there, and set it if so
2741 # throw XML::SAX::Exception::NotRecognized if it's not there
2742 # throw XML::SAX::Exception::NotSupported if it's there but we
2743 # don't support it
2744
27452102µs254µs my %features = $self->get_features();
# spent 54µs making 2 calls to XML::SAX::Base::get_features, avg 27µs/call
2746210µs if (exists $features{$feat}) {
2747267µs228µs my %supported = map { $_ => 1 } $self->supported_features();
# spent 28µs making 2 calls to XML::SAX::Base::supported_features, avg 14µs/call
2748272µs if ($supported{$feat}) {
2749 return $self->{__PACKAGE__ . "::Features"}{$feat} = $value;
2750 }
2751 throw XML::SAX::Exception::NotSupported(
2752 Message => "The feature '$feat' is not supported by " . ref($self),
2753 Exception => undef,
2754 );
2755 }
2756 throw XML::SAX::Exception::NotRecognized(
2757 Message => "The feature '$feat' is not recognized by " . ref($self),
2758 Exception => undef,
2759 );
2760}
2761#-------------------------------------------------------------------#
2762
2763#-------------------------------------------------------------------#
2764# get_handler and friends
2765#-------------------------------------------------------------------#
2766sub get_handler {
2767 my $self = shift;
2768 my $handler_type = shift;
2769 $handler_type ||= 'Handler';
2770 return defined( $self->{$handler_type} ) ? $self->{$handler_type} : undef;
2771}
2772
2773sub get_document_handler {
2774 my $self = shift;
2775 return $self->get_handler('DocumentHandler', @_);
2776}
2777
2778sub get_content_handler {
2779 my $self = shift;
2780 return $self->get_handler('ContentHandler', @_);
2781}
2782
2783sub get_dtd_handler {
2784 my $self = shift;
2785 return $self->get_handler('DTDHandler', @_);
2786}
2787
2788sub get_lexical_handler {
2789 my $self = shift;
2790 return $self->get_handler('LexicalHandler', @_);
2791}
2792
2793sub get_decl_handler {
2794 my $self = shift;
2795 return $self->get_handler('DeclHandler', @_);
2796}
2797
2798sub get_error_handler {
2799 my $self = shift;
2800 return $self->get_handler('ErrorHandler', @_);
2801}
2802
2803sub get_entity_resolver {
2804 my $self = shift;
2805 return $self->get_handler('EntityResolver', @_);
2806}
2807#-------------------------------------------------------------------#
2808
2809#-------------------------------------------------------------------#
2810# set_handler and friends
2811#-------------------------------------------------------------------#
2812sub set_handler {
2813 my $self = shift;
2814 my ($new_handler, $handler_type) = reverse @_;
2815 $handler_type ||= 'Handler';
2816 $self->{Methods} = {} if $self->{Methods};
2817 $self->{$handler_type} = $new_handler;
2818 $self->{ParseOptions}->{$handler_type} = $new_handler;
2819 return 1;
2820}
2821
2822sub set_document_handler {
2823 my $self = shift;
2824 return $self->set_handler('DocumentHandler', @_);
2825}
2826
2827sub set_content_handler {
2828 my $self = shift;
2829 return $self->set_handler('ContentHandler', @_);
2830}
2831sub set_dtd_handler {
2832 my $self = shift;
2833 return $self->set_handler('DTDHandler', @_);
2834}
2835sub set_lexical_handler {
2836 my $self = shift;
2837 return $self->set_handler('LexicalHandler', @_);
2838}
2839sub set_decl_handler {
2840 my $self = shift;
2841 return $self->set_handler('DeclHandler', @_);
2842}
2843sub set_error_handler {
2844 my $self = shift;
2845 return $self->set_handler('ErrorHandler', @_);
2846}
2847sub set_entity_resolver {
2848 my $self = shift;
2849 return $self->set_handler('EntityResolver', @_);
2850}
2851
2852#-------------------------------------------------------------------#
2853
2854#-------------------------------------------------------------------#
2855# supported_features
2856#-------------------------------------------------------------------#
2857
# spent 28µs within XML::SAX::Base::supported_features which was called 2 times, avg 14µs/call: # 2 times (28µs+0s) by XML::SAX::Base::set_feature at line 2747, avg 14µs/call
sub supported_features {
285824µs my $self = shift;
2859 # Only namespaces are required by all parsers
2860 return (
2861243µs 'http://xml.org/sax/features/namespaces',
2862 );
2863}
2864#-------------------------------------------------------------------#
2865
2866sub no_op {
2867 # this space intentionally blank
2868}
2869
2870
2871package XML::SAX::Base::NoHandler;
2872
# spent 34µs within XML::SAX::Base::NoHandler::BEGIN@2872 which was called: # once (34µs+0s) by XML::LibXML::SAX::BEGIN@18 at line 2874
BEGIN {
2873140µs $XML::SAX::Base::NoHandler::VERSION = '1.08';
28741541µs134µs}
# spent 34µs making 1 call to XML::SAX::Base::NoHandler::BEGIN@2872
2875
2876# we need a fake handler that doesn't implement anything, this
2877# simplifies the code a lot (though given the recent changes,
2878# it may be better to do without)
2879sub new {
2880 #warn "no handler called\n";
2881 return bless {};
2882}
2883
2884119µs1;
2885
2886__END__