← Index
NYTProf Performance Profile   « line view »
For svc/members/upsert
  Run on Tue Jan 13 11:50:22 2015
Reported on Tue Jan 13 12:09:47 2015

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