← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/share/koha/opac/cgi-bin/opac/opac-search.pl
  Run on Tue Oct 15 17:10:45 2013
Reported on Tue Oct 15 17:11:21 2013

Filename/usr/share/perl/5.10/constant.pm
StatementsExecuted 8103 statements in 19.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3423424413.2ms16.4msconstant::::importconstant::import
362111.40ms1.40msconstant::::CORE:matchconstant::CORE:match (opcode)
36211479µs479µsconstant::::CORE:regcompconstant::CORE:regcomp (opcode)
11150µs50µsconstant::::BEGIN@2constant::BEGIN@2
11121µs48µsconstant::::BEGIN@38constant::BEGIN@38
11118µs25µsconstant::::BEGIN@3constant::BEGIN@3
11117µs146µsconstant::::BEGIN@6constant::BEGIN@6
11117µs43µsconstant::::BEGIN@101constant::BEGIN@101
11117µs166µsconstant::::BEGIN@4constant::BEGIN@4
1113µs3µsconstant::::__ANON__[:119]constant::__ANON__[:119]
0000s0sconstant::::__ANON__[:115]constant::__ANON__[:115]
0000s0sconstant::::__ANON__[:121]constant::__ANON__[:121]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package constant;
2385µs150µs
# spent 50µs within constant::BEGIN@2 which was called: # once (50µs+0s) by Cache::Memcached::GetParser::BEGIN@8 at line 2
use 5.005;
# spent 50µs making 1 call to constant::BEGIN@2
3356µs232µs
# spent 25µs (18+7) within constant::BEGIN@3 which was called: # once (18µs+7µs) by Cache::Memcached::GetParser::BEGIN@8 at line 3
use strict;
# spent 25µs making 1 call to constant::BEGIN@3 # spent 7µs making 1 call to strict::import
4359µs2315µs
# spent 166µs (17+149) within constant::BEGIN@4 which was called: # once (17µs+149µs) by Cache::Memcached::GetParser::BEGIN@8 at line 4
use warnings::register;
# spent 166µs making 1 call to constant::BEGIN@4 # spent 149µs making 1 call to warnings::register::import
5
63259µs2275µs
# spent 146µs (17+129) within constant::BEGIN@6 which was called: # once (17µs+129µs) by Cache::Memcached::GetParser::BEGIN@8 at line 6
use vars qw($VERSION %declared);
# spent 146µs making 1 call to constant::BEGIN@6 # spent 129µs making 1 call to vars::import
712µs$VERSION = '1.17';
8
9#=======================================================================
10
11# Some names are evil choices.
12111µsmy %keywords = map +($_, 1), qw{ BEGIN INIT CHECK END DESTROY AUTOLOAD };
1315µs$keywords{UNITCHECK}++ if $] > 5.009;
14
15110µsmy %forced_into_main = map +($_, 1),
16 qw{ STDIN STDOUT STDERR ARGV ARGVOUT ENV INC SIG };
17
18117µsmy %forbidden = (%keywords, %forced_into_main);
19
20#=======================================================================
21# import() - import symbols into user's namespace
22#
23# What we actually do is define a function in the caller's namespace
24# which returns the value. The function we create will normally
25# be inlined as a constant, thereby avoiding further sub calling
26# overhead.
27#=======================================================================
28
# spent 16.4ms (13.2+3.29) within constant::import which was called 342 times, avg 48µs/call: # once (454µs+11µs) by XML::LibXML::Common::BEGIN@153 at line 153 of XML/LibXML/Common.pm # once (317µs+103µs) by XML::LibXML::BEGIN@234 at line 235 of XML/LibXML.pm # once (116µs+30µs) by Template::Context::BEGIN@33 at line 33 of Template/Context.pm # once (112µs+33µs) by Math::BigInt::Calc::BEGIN@1874 at line 1874 of Math/BigInt/Calc.pm # once (81µs+48µs) by Cache::Memcached::GetParser::BEGIN@8 at line 8 of Cache/Memcached/GetParser.pm # once (115µs+13µs) by DateTime::BEGIN@75 at line 75 of DateTime.pm # once (92µs+19µs) by XML::LibXML::Error::BEGIN@27 at line 27 of XML/LibXML/Error.pm # once (91µs+16µs) by Cache::Memcached::BEGIN@33 at line 33 of Cache/Memcached.pm # once (80µs+26µs) by Template::Provider::BEGIN@50 at line 50 of Template/Provider.pm # once (84µs+21µs) by Module::Load::Conditional::BEGIN@14 at line 14 of Module/Load/Conditional.pm # once (80µs+26µs) by YAML::Type::regexp::BEGIN@200 at line 217 of YAML/Types.pm # once (91µs+13µs) by DateTime::Span::BEGIN@15 at line 15 of DateTime/Span.pm # once (81µs+22µs) by XML::LibXML::Error::BEGIN@29 at line 29 of XML/LibXML/Error.pm # once (81µs+20µs) by Time::Local::BEGIN@28 at line 28 of Time/Local.pm # once (80µs+19µs) by XML::LibXML::Error::BEGIN@36 at line 36 of XML/LibXML/Error.pm # once (78µs+21µs) by XML::LibXML::Error::BEGIN@42 at line 42 of XML/LibXML/Error.pm # once (75µs+22µs) by XML::LibXML::Error::BEGIN@35 at line 35 of XML/LibXML/Error.pm # once (79µs+18µs) by XML::LibXML::BEGIN@21 at line 21 of XML/LibXML.pm # once (79µs+18µs) by XML::LibXML::BEGIN@20 at line 20 of XML/LibXML.pm # once (78µs+18µs) by XML::LibXML::Error::BEGIN@28 at line 28 of XML/LibXML/Error.pm # once (65µs+19µs) by Template::Constants::BEGIN@40 at line 40 of Template/Constants.pm # once (63µs+20µs) by Template::Parser::BEGIN@44 at line 44 of Template/Parser.pm # once (66µs+17µs) by DateTime::TimeZone::BEGIN@17 at line 17 of DateTime/TimeZone.pm # once (65µs+16µs) by XML::LibXML::Error::BEGIN@37 at line 37 of XML/LibXML/Error.pm # once (62µs+18µs) by C4::Context::BEGIN@191 at line 191 of /usr/share/koha/lib/C4/Context.pm # once (64µs+15µs) by XML::LibXML::Error::BEGIN@34 at line 34 of XML/LibXML/Error.pm # once (59µs+17µs) by XML::LibXML::Error::BEGIN@40 at line 40 of XML/LibXML/Error.pm # once (59µs+16µs) by IO::Uncompress::Base::BEGIN@14 at line 14 of IO/Uncompress/Base.pm # once (60µs+15µs) by IO::Compress::Base::Common::BEGIN@44 at line 44 of IO/Compress/Base/Common.pm # once (62µs+12µs) by Compress::Raw::Zlib::BEGIN@112 at line 112 of Compress/Raw/Zlib.pm # once (59µs+13µs) by MARC::Record::BEGIN@34 at line 34 of MARC/Record.pm # once (53µs+18µs) by C4::Boolean::BEGIN@55 at line 55 of /usr/share/koha/lib/C4/Boolean.pm # once (56µs+15µs) by Compress::Raw::Zlib::BEGIN@110 at line 110 of Compress/Raw/Zlib.pm # once (57µs+13µs) by XML::LibXML::Error::BEGIN@43 at line 43 of XML/LibXML/Error.pm # once (56µs+15µs) by XML::LibXML::Error::BEGIN@44 at line 44 of XML/LibXML/Error.pm # once (56µs+14µs) by IO::Compress::Gzip::Constants::BEGIN@113 at line 113 of IO/Compress/Gzip/Constants.pm # once (54µs+15µs) by XML::LibXML::Error::BEGIN@47 at line 47 of XML/LibXML/Error.pm # once (52µs+18µs) by JSON::PP::IncrParser::BEGIN@1353 at line 1353 of JSON/PP.pm # once (53µs+16µs) by Compress::Raw::Zlib::BEGIN@102 at line 102 of Compress/Raw/Zlib.pm # once (65µs+4µs) by DateTime::BEGIN@70 at line 70 of DateTime.pm # once (54µs+13µs) by Template::Provider::BEGIN@55 at line 55 of Template/Provider.pm # once (52µs+15µs) by XML::LibXML::BEGIN@176 at line 176 of XML/LibXML.pm # once (53µs+13µs) by XML::LibXML::Error::BEGIN@46 at line 46 of XML/LibXML/Error.pm # once (53µs+13µs) by XML::LibXML::Common::BEGIN@149 at line 149 of XML/LibXML/Common.pm # once (46µs+20µs) by MultipartBuffer::BEGIN@3812 at line 3812 of CGI.pm # once (48µs+18µs) by Set::Infinite::_recurrence::BEGIN@9 at line 9 of Set/Infinite/_recurrence.pm # once (52µs+13µs) by MARC::Charset::Constants::BEGIN@43 at line 43 of MARC/Charset/Constants.pm # once (53µs+12µs) by Compress::Raw::Zlib::BEGIN@103 at line 103 of Compress/Raw/Zlib.pm # once (53µs+12µs) by MARC::Charset::Constants::BEGIN@22 at line 22 of MARC/Charset/Constants.pm # once (50µs+13µs) by JSON::PP::BEGIN@21 at line 21 of JSON/PP.pm # once (51µs+12µs) by DateTime::Set::BEGIN@16 at line 16 of DateTime/Set.pm # once (52µs+11µs) by Template::Constants::BEGIN@75 at line 75 of Template/Constants.pm # once (50µs+13µs) by C4::Tags::BEGIN@30 at line 30 of /usr/share/koha/lib/C4/Tags.pm # once (50µs+12µs) by Compress::Raw::Zlib::BEGIN@111 at line 111 of Compress/Raw/Zlib.pm # once (46µs+16µs) by Template::Constants::BEGIN@52 at line 52 of Template/Constants.pm # once (50µs+12µs) by YAML::Loader::BEGIN@14 at line 14 of YAML/Loader.pm # once (50µs+10µs) by Template::Constants::BEGIN@66 at line 66 of Template/Constants.pm # once (48µs+13µs) by Compress::Zlib::BEGIN@54 at line 54 of Compress/Zlib.pm # once (42µs+18µs) by Template::Exception::BEGIN@24 at line 24 of Template/Exception.pm # once (48µs+12µs) by YAML::Syck::BEGIN@36 at line 53 of YAML/Syck.pm # once (53µs+7µs) by XML::LibXML::BEGIN@167 at line 167 of XML/LibXML.pm # once (47µs+13µs) by C4::VirtualShelves::BEGIN@27 at line 27 of /usr/share/koha/lib/C4/VirtualShelves.pm # once (49µs+11µs) by XML::LibXML::Error::BEGIN@32 at line 32 of XML/LibXML/Error.pm # once (47µs+13µs) by IO::Compress::Gzip::Constants::BEGIN@65 at line 65 of IO/Compress/Gzip/Constants.pm # once (47µs+13µs) by Convert::ASN1::BEGIN@14 at line 14 of Convert/ASN1.pm # once (46µs+13µs) by XML::LibXML::BEGIN@159 at line 159 of XML/LibXML.pm # once (46µs+13µs) by IO::Compress::Base::Common::BEGIN@41 at line 41 of IO/Compress/Base/Common.pm # once (49µs+10µs) by Template::Provider::BEGIN@53 at line 53 of Template/Provider.pm # once (46µs+13µs) by XML::LibXML::Error::BEGIN@30 at line 30 of XML/LibXML/Error.pm # once (45µs+14µs) by Template::Iterator::BEGIN@31 at line 31 of Template/Iterator.pm # once (42µs+16µs) by Template::Provider::BEGIN@52 at line 52 of Template/Provider.pm # once (46µs+12µs) by XML::LibXML::Common::BEGIN@152 at line 152 of XML/LibXML/Common.pm # once (45µs+13µs) by YAML::BEGIN@15 at line 15 of YAML.pm # once (46µs+11µs) by MARC::Field::BEGIN@7 at line 7 of MARC/Field.pm # once (47µs+11µs) by Template::Provider::BEGIN@51 at line 51 of Template/Provider.pm # once (46µs+11µs) by IO::Uncompress::Base::BEGIN@15 at line 15 of IO/Uncompress/Base.pm # once (46µs+12µs) by XML::LibXML::Error::BEGIN@41 at line 41 of XML/LibXML/Error.pm # once (46µs+12µs) by DateTime::BEGIN@73 at line 73 of DateTime.pm # once (45µs+12µs) by XML::LibXML::Error::BEGIN@39 at line 39 of XML/LibXML/Error.pm # once (44µs+13µs) by XML::LibXML::BEGIN@163 at line 163 of XML/LibXML.pm # once (44µs+12µs) by XML::LibXML::BEGIN@174 at line 174 of XML/LibXML.pm # once (46µs+11µs) by DateTime::Set::BEGIN@15 at line 15 of DateTime/Set.pm # once (43µs+13µs) by DateTime::BEGIN@67 at line 67 of DateTime.pm # once (45µs+11µs) by DateTime::SpanSet::BEGIN@16 at line 16 of DateTime/SpanSet.pm # once (44µs+12µs) by CGI::BEGIN@32 at line 32 of CGI.pm # once (45µs+11µs) by YAML::Loader::BEGIN@15 at line 15 of YAML/Loader.pm # once (46µs+9µs) by XML::LibXML::Error::BEGIN@33 at line 33 of XML/LibXML/Error.pm # once (42µs+13µs) by Compress::Raw::Zlib::BEGIN@104 at line 104 of Compress/Raw/Zlib.pm # once (46µs+8µs) by Template::Constants::BEGIN@70 at line 70 of Template/Constants.pm # once (44µs+11µs) by DateTime::Duration::BEGIN@23 at line 23 of DateTime/Duration.pm # once (44µs+10µs) by Template::Constants::BEGIN@43 at line 43 of Template/Constants.pm # once (46µs+8µs) by IO::Compress::Base::Common::BEGIN@43 at line 43 of IO/Compress/Base/Common.pm # once (42µs+12µs) by YAML::Loader::BEGIN@13 at line 13 of YAML/Loader.pm # once (43µs+10µs) by XML::LibXML::Error::BEGIN@38 at line 38 of XML/LibXML/Error.pm # once (41µs+12µs) by IO::Compress::Base::Common::BEGIN@130 at line 130 of IO/Compress/Base/Common.pm # once (42µs+11µs) by MARC::File::USMARC::BEGIN@20 at line 20 of MARC/File/USMARC.pm # once (42µs+10µs) by Compress::Raw::Zlib::BEGIN@70 at line 70 of Compress/Raw/Zlib.pm # once (41µs+11µs) by Compress::Raw::Zlib::BEGIN@101 at line 101 of Compress/Raw/Zlib.pm # once (42µs+11µs) by YAML::Loader::BEGIN@16 at line 16 of YAML/Loader.pm # once (45µs+7µs) by C4::Tags::BEGIN@29 at line 29 of /usr/share/koha/lib/C4/Tags.pm # once (40µs+11µs) by XML::SAX::BEGIN@20 at line 20 of XML/SAX.pm # once (41µs+10µs) by XML::LibXML::BEGIN@161 at line 161 of XML/LibXML.pm # once (42µs+9µs) by Compress::Raw::Zlib::BEGIN@106 at line 106 of Compress/Raw/Zlib.pm # once (39µs+12µs) by IO::Compress::Gzip::Constants::BEGIN@86 at line 86 of IO/Compress/Gzip/Constants.pm # once (41µs+10µs) by XML::LibXML::Common::BEGIN@196 at line 196 of XML/LibXML/Common.pm # once (38µs+12µs) by IO::Compress::Base::Common::BEGIN@42 at line 42 of IO/Compress/Base/Common.pm # once (40µs+10µs) by Template::Provider::BEGIN@54 at line 54 of Template/Provider.pm # once (40µs+9µs) by U64::BEGIN@818 at line 818 of IO/Compress/Base/Common.pm # once (36µs+13µs) by Compress::Raw::Zlib::BEGIN@108 at line 108 of Compress/Raw/Zlib.pm # once (37µs+11µs) by IO::Compress::Base::Common::BEGIN@461 at line 461 of IO/Compress/Base/Common.pm # once (38µs+9µs) by Set::Infinite::Basic::BEGIN@20 at line 20 of Set/Infinite/Basic.pm # once (37µs+10µs) by IO::Compress::Base::Common::BEGIN@463 at line 463 of IO/Compress/Base/Common.pm # once (37µs+9µs) by JSON::PP::BEGIN@28 at line 28 of JSON/PP.pm # once (37µs+8µs) by MARC::Charset::Constants::BEGIN@32 at line 32 of MARC/Charset/Constants.pm # once (36µs+9µs) by Template::Parser::BEGIN@45 at line 45 of Template/Parser.pm # once (36µs+10µs) by XML::LibXML::Error::BEGIN@48 at line 48 of XML/LibXML/Error.pm # once (36µs+9µs) by Template::Constants::BEGIN@76 at line 76 of Template/Constants.pm # once (36µs+9µs) by XML::LibXML::Common::BEGIN@150 at line 150 of XML/LibXML/Common.pm # once (37µs+8µs) by Compress::Zlib::BEGIN@55 at line 55 of Compress/Zlib.pm # once (35µs+9µs) by XML::LibXML::Common::BEGIN@155 at line 155 of XML/LibXML/Common.pm # once (35µs+9µs) by IO::Compress::Base::Common::BEGIN@471 at line 471 of IO/Compress/Base/Common.pm # once (33µs+11µs) by XML::LibXML::Error::BEGIN@49 at line 49 of XML/LibXML/Error.pm # once (34µs+9µs) by XML::LibXML::Error::BEGIN@45 at line 45 of XML/LibXML/Error.pm # once (35µs+9µs) by IO::Compress::Gzip::Constants::BEGIN@143 at line 143 of IO/Compress/Gzip/Constants.pm # once (33µs+10µs) by IO::Compress::Gzip::Constants::BEGIN@76 at line 76 of IO/Compress/Gzip/Constants.pm # once (36µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@74 at line 74 of IO/Compress/Gzip/Constants.pm # once (34µs+9µs) by Compress::Raw::Zlib::BEGIN@84 at line 84 of Compress/Raw/Zlib.pm # once (33µs+9µs) by Template::Context::BEGIN@34 at line 34 of Template/Context.pm # once (33µs+9µs) by IO::Compress::Base::Common::BEGIN@469 at line 469 of IO/Compress/Base/Common.pm # once (34µs+7µs) by Template::Constants::BEGIN@42 at line 42 of Template/Constants.pm # once (32µs+9µs) by Template::Parser::BEGIN@46 at line 46 of Template/Parser.pm # once (32µs+9µs) by XML::LibXML::Common::BEGIN@158 at line 158 of XML/LibXML/Common.pm # once (35µs+6µs) by Template::Constants::BEGIN@45 at line 45 of Template/Constants.pm # once (32µs+9µs) by IO::Compress::Gzip::Constants::BEGIN@80 at line 80 of IO/Compress/Gzip/Constants.pm # once (33µs+8µs) by XML::LibXML::BEGIN@164 at line 164 of XML/LibXML.pm # once (31µs+10µs) by DateTime::TimeZone::BEGIN@21 at line 21 of DateTime/TimeZone.pm # once (34µs+7µs) by Template::Constants::BEGIN@53 at line 53 of Template/Constants.pm # once (32µs+9µs) by XML::LibXML::BEGIN@162 at line 162 of XML/LibXML.pm # once (33µs+7µs) by MARC::Charset::Constants::BEGIN@24 at line 24 of MARC/Charset/Constants.pm # once (32µs+9µs) by Time::Local::BEGIN@29 at line 29 of Time/Local.pm # once (31µs+9µs) by IO::Compress::Gzip::Constants::BEGIN@109 at line 109 of IO/Compress/Gzip/Constants.pm # once (32µs+8µs) by MARC::Charset::Constants::BEGIN@36 at line 36 of MARC/Charset/Constants.pm # once (32µs+8µs) by MARC::Charset::Constants::BEGIN@31 at line 31 of MARC/Charset/Constants.pm # once (32µs+8µs) by IO::Compress::Base::Common::BEGIN@476 at line 476 of IO/Compress/Base/Common.pm # once (31µs+9µs) by Template::Constants::BEGIN@67 at line 67 of Template/Constants.pm # once (32µs+8µs) by JSON::PP::BEGIN@39 at line 39 of JSON/PP.pm # once (31µs+8µs) by JSON::PP::BEGIN@37 at line 37 of JSON/PP.pm # once (29µs+10µs) by DateTime::TimeZone::BEGIN@18 at line 18 of DateTime/TimeZone.pm # once (31µs+8µs) by IO::Compress::Base::Common::BEGIN@131 at line 131 of IO/Compress/Base/Common.pm # once (30µs+8µs) by Compress::Raw::Zlib::BEGIN@105 at line 105 of Compress/Raw/Zlib.pm # once (35µs+4µs) by DateTime::BEGIN@69 at line 69 of DateTime.pm # once (30µs+9µs) by Compress::Raw::Zlib::BEGIN@83 at line 83 of Compress/Raw/Zlib.pm # once (30µs+8µs) by JSON::PP::BEGIN@41 at line 41 of JSON/PP.pm # once (30µs+8µs) by Cache::Memcached::BEGIN@34 at line 34 of Cache/Memcached.pm # once (29µs+9µs) by XML::LibXML::Common::BEGIN@154 at line 154 of XML/LibXML/Common.pm # once (30µs+9µs) by IO::Compress::Base::Common::BEGIN@132 at line 132 of IO/Compress/Base/Common.pm # once (31µs+7µs) by Template::Constants::BEGIN@48 at line 48 of Template/Constants.pm # once (30µs+8µs) by Template::Service::BEGIN@31 at line 31 of Template/Service.pm # once (29µs+9µs) by IO::Compress::Gzip::Constants::BEGIN@114 at line 114 of IO/Compress/Gzip/Constants.pm # once (32µs+6µs) by Template::Exception::BEGIN@26 at line 26 of Template/Exception.pm # once (31µs+6µs) by C4::VirtualShelves::BEGIN@29 at line 29 of /usr/share/koha/lib/C4/VirtualShelves.pm # once (29µs+9µs) by IO::Compress::Base::Common::BEGIN@473 at line 473 of IO/Compress/Base/Common.pm # once (29µs+9µs) by Set::Infinite::Basic::BEGIN@21 at line 21 of Set/Infinite/Basic.pm # once (31µs+7µs) by MARC::File::USMARC::BEGIN@21 at line 21 of MARC/File/USMARC.pm # once (26µs+11µs) by IO::Compress::Gzip::Constants::BEGIN@84 at line 84 of IO/Compress/Gzip/Constants.pm # once (29µs+9µs) by Cache::Memcached::GetParser::BEGIN@9 at line 9 of Cache/Memcached/GetParser.pm # once (31µs+7µs) by Template::Constants::BEGIN@64 at line 64 of Template/Constants.pm # once (31µs+7µs) by IO::Compress::Base::Common::BEGIN@465 at line 465 of IO/Compress/Base/Common.pm # once (29µs+8µs) by MARC::Charset::Constants::BEGIN@44 at line 44 of MARC/Charset/Constants.pm # once (29µs+8µs) by Template::Parser::BEGIN@47 at line 47 of Template/Parser.pm # once (29µs+8µs) by DateTime::Span::BEGIN@16 at line 16 of DateTime/Span.pm # once (29µs+8µs) by DateTime::TimeZone::BEGIN@23 at line 23 of DateTime/TimeZone.pm # once (30µs+7µs) by Template::Constants::BEGIN@74 at line 74 of Template/Constants.pm # once (30µs+7µs) by Compress::Zlib::BEGIN@56 at line 56 of Compress/Zlib.pm # once (28µs+8µs) by XML::LibXML::Common::BEGIN@197 at line 197 of XML/LibXML/Common.pm # once (28µs+9µs) by IO::Compress::Gzip::Constants::BEGIN@87 at line 87 of IO/Compress/Gzip/Constants.pm # once (29µs+7µs) by XML::LibXML::Common::BEGIN@157 at line 157 of XML/LibXML/Common.pm # once (29µs+7µs) by JSON::PP::BEGIN@36 at line 36 of JSON/PP.pm # once (30µs+7µs) by XML::LibXML::Error::BEGIN@54 at line 54 of XML/LibXML/Error.pm # once (30µs+6µs) by Compress::Raw::Zlib::BEGIN@114 at line 114 of Compress/Raw/Zlib.pm # once (28µs+8µs) by Template::Constants::BEGIN@41 at line 41 of Template/Constants.pm # once (30µs+6µs) by MARC::Charset::Constants::BEGIN@35 at line 35 of MARC/Charset/Constants.pm # once (30µs+6µs) by XML::LibXML::Common::BEGIN@194 at line 194 of XML/LibXML/Common.pm # once (28µs+8µs) by Compress::Raw::Zlib::BEGIN@113 at line 113 of Compress/Raw/Zlib.pm # once (29µs+7µs) by XML::LibXML::Error::BEGIN@51 at line 51 of XML/LibXML/Error.pm # once (28µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@115 at line 115 of IO/Compress/Gzip/Constants.pm # once (29µs+6µs) by IO::Compress::Gzip::Constants::BEGIN@92 at line 92 of IO/Compress/Gzip/Constants.pm # once (27µs+8µs) by XML::LibXML::BEGIN@177 at line 177 of XML/LibXML.pm # once (27µs+8µs) by DateTime::TimeZone::BEGIN@22 at line 22 of DateTime/TimeZone.pm # once (28µs+8µs) by XML::LibXML::Error::BEGIN@52 at line 52 of XML/LibXML/Error.pm # once (28µs+8µs) by Template::Context::BEGIN@35 at line 35 of Template/Context.pm # once (28µs+7µs) by U64::BEGIN@820 at line 820 of IO/Compress/Base/Common.pm # once (29µs+6µs) by Template::Constants::BEGIN@80 at line 80 of Template/Constants.pm # once (28µs+7µs) by MARC::File::USMARC::BEGIN@22 at line 22 of MARC/File/USMARC.pm # once (28µs+7µs) by XML::LibXML::Common::BEGIN@156 at line 156 of XML/LibXML/Common.pm # once (27µs+7µs) by IO::Compress::Base::Common::BEGIN@470 at line 470 of IO/Compress/Base/Common.pm # once (27µs+8µs) by XML::LibXML::BEGIN@259 at line 259 of XML/LibXML.pm # once (28µs+7µs) by XML::LibXML::Common::BEGIN@163 at line 163 of XML/LibXML/Common.pm # once (27µs+7µs) by IO::Compress::Base::Common::BEGIN@478 at line 478 of IO/Compress/Base/Common.pm # once (27µs+8µs) by XML::LibXML::BEGIN@175 at line 175 of XML/LibXML.pm # once (28µs+6µs) by MARC::Charset::Constants::BEGIN@45 at line 45 of MARC/Charset/Constants.pm # once (27µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@77 at line 77 of IO/Compress/Gzip/Constants.pm # once (26µs+8µs) by DateTime::TimeZone::BEGIN@25 at line 25 of DateTime/TimeZone.pm # once (26µs+8µs) by DateTime::TimeZone::BEGIN@24 at line 24 of DateTime/TimeZone.pm # once (28µs+6µs) by XML::SAX::BEGIN@23 at line 23 of XML/SAX.pm # once (27µs+7µs) by XML::LibXML::Common::BEGIN@171 at line 171 of XML/LibXML/Common.pm # once (27µs+7µs) by DateTime::SpanSet::BEGIN@17 at line 17 of DateTime/SpanSet.pm # once (27µs+7µs) by JSON::PP::BEGIN@22 at line 22 of JSON/PP.pm # once (27µs+7µs) by Template::Constants::BEGIN@72 at line 72 of Template/Constants.pm # once (27µs+7µs) by Set::Infinite::_recurrence::BEGIN@10 at line 10 of Set/Infinite/_recurrence.pm # once (27µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@69 at line 69 of IO/Compress/Gzip/Constants.pm # once (27µs+7µs) by XML::LibXML::Common::BEGIN@172 at line 172 of XML/LibXML/Common.pm # once (26µs+7µs) by IO::Compress::Base::Common::BEGIN@464 at line 464 of IO/Compress/Base/Common.pm # once (27µs+7µs) by Time::Local::BEGIN@30 at line 30 of Time/Local.pm # once (26µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@75 at line 75 of IO/Compress/Gzip/Constants.pm # once (27µs+7µs) by XML::LibXML::Common::BEGIN@151 at line 151 of XML/LibXML/Common.pm # once (27µs+7µs) by MARC::Charset::Constants::BEGIN@27 at line 27 of MARC/Charset/Constants.pm # once (27µs+6µs) by JSON::PP::BEGIN@29 at line 29 of JSON/PP.pm # once (27µs+7µs) by XML::LibXML::Common::BEGIN@160 at line 160 of XML/LibXML/Common.pm # once (27µs+7µs) by MARC::Charset::Constants::BEGIN@29 at line 29 of MARC/Charset/Constants.pm # once (27µs+7µs) by JSON::PP::BEGIN@34 at line 34 of JSON/PP.pm # once (27µs+6µs) by Compress::Raw::Zlib::BEGIN@85 at line 85 of Compress/Raw/Zlib.pm # once (26µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@111 at line 111 of IO/Compress/Gzip/Constants.pm # once (27µs+7µs) by IO::Compress::Base::Common::BEGIN@462 at line 462 of IO/Compress/Base/Common.pm # once (27µs+7µs) by JSON::PP::IncrParser::BEGIN@1354 at line 1354 of JSON/PP.pm # once (26µs+7µs) by Compress::Raw::Zlib::BEGIN@71 at line 71 of Compress/Raw/Zlib.pm # once (25µs+8µs) by DateTime::TimeZone::BEGIN@27 at line 27 of DateTime/TimeZone.pm # once (27µs+6µs) by XML::LibXML::BEGIN@172 at line 172 of XML/LibXML.pm # once (26µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@82 at line 82 of IO/Compress/Gzip/Constants.pm # once (26µs+7µs) by JSON::PP::BEGIN@38 at line 38 of JSON/PP.pm # once (26µs+7µs) by XML::LibXML::Common::BEGIN@187 at line 187 of XML/LibXML/Common.pm # once (26µs+7µs) by XML::LibXML::Common::BEGIN@162 at line 162 of XML/LibXML/Common.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@173 at line 173 of XML/LibXML/Common.pm # once (27µs+6µs) by XML::LibXML::Common::BEGIN@164 at line 164 of XML/LibXML/Common.pm # once (26µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@73 at line 73 of IO/Compress/Gzip/Constants.pm # once (26µs+7µs) by XML::LibXML::Common::BEGIN@165 at line 165 of XML/LibXML/Common.pm # once (26µs+6µs) by MARC::Charset::Constants::BEGIN@34 at line 34 of MARC/Charset/Constants.pm # once (25µs+8µs) by DateTime::TimeZone::BEGIN@26 at line 26 of DateTime/TimeZone.pm # once (26µs+7µs) by IO::Compress::Base::Common::BEGIN@477 at line 477 of IO/Compress/Base/Common.pm # once (26µs+7µs) by Template::Constants::BEGIN@71 at line 71 of Template/Constants.pm # once (26µs+6µs) by MARC::Charset::Constants::BEGIN@25 at line 25 of MARC/Charset/Constants.pm # once (26µs+7µs) by XML::LibXML::BEGIN@168 at line 168 of XML/LibXML.pm # once (26µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@66 at line 66 of IO/Compress/Gzip/Constants.pm # once (26µs+7µs) by Template::Exception::BEGIN@25 at line 25 of Template/Exception.pm # once (26µs+7µs) by MARC::Charset::Constants::BEGIN@40 at line 40 of MARC/Charset/Constants.pm # once (26µs+6µs) by MARC::Charset::Constants::BEGIN@47 at line 47 of MARC/Charset/Constants.pm # once (26µs+7µs) by Template::Iterator::BEGIN@32 at line 32 of Template/Iterator.pm # once (26µs+7µs) by XML::LibXML::Common::BEGIN@195 at line 195 of XML/LibXML/Common.pm # once (26µs+6µs) by MARC::Charset::Constants::BEGIN@39 at line 39 of MARC/Charset/Constants.pm # once (26µs+6µs) by C4::VirtualShelves::BEGIN@28 at line 28 of /usr/share/koha/lib/C4/VirtualShelves.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@185 at line 185 of XML/LibXML/Common.pm # once (26µs+6µs) by IO::Compress::Base::Common::BEGIN@134 at line 134 of IO/Compress/Base/Common.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@159 at line 159 of XML/LibXML/Common.pm # once (26µs+6µs) by IO::Compress::Gzip::Constants::BEGIN@67 at line 67 of IO/Compress/Gzip/Constants.pm # once (26µs+6µs) by IO::Compress::Gzip::Constants::BEGIN@70 at line 70 of IO/Compress/Gzip/Constants.pm # once (26µs+6µs) by JSON::PP::IncrParser::BEGIN@1356 at line 1356 of JSON/PP.pm # once (26µs+7µs) by XML::LibXML::Common::BEGIN@198 at line 198 of XML/LibXML/Common.pm # once (26µs+7µs) by XML::LibXML::Common::BEGIN@184 at line 184 of XML/LibXML/Common.pm # once (26µs+6µs) by XML::LibXML::BEGIN@160 at line 160 of XML/LibXML.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@189 at line 189 of XML/LibXML/Common.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@181 at line 181 of XML/LibXML/Common.pm # once (26µs+6µs) by Template::Constants::BEGIN@65 at line 65 of Template/Constants.pm # once (26µs+6µs) by MARC::Charset::Constants::BEGIN@42 at line 42 of MARC/Charset/Constants.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@188 at line 188 of XML/LibXML/Common.pm # once (26µs+6µs) by MARC::Charset::Constants::BEGIN@41 at line 41 of MARC/Charset/Constants.pm # once (26µs+6µs) by Template::Constants::BEGIN@69 at line 69 of Template/Constants.pm # once (25µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@89 at line 89 of IO/Compress/Gzip/Constants.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@180 at line 180 of XML/LibXML/Common.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@179 at line 179 of XML/LibXML/Common.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@161 at line 161 of XML/LibXML/Common.pm # once (25µs+6µs) by XML::LibXML::Error::BEGIN@55 at line 55 of XML/LibXML/Error.pm # once (26µs+6µs) by Template::Constants::BEGIN@79 at line 79 of Template/Constants.pm # once (26µs+6µs) by JSON::PP::BEGIN@26 at line 26 of JSON/PP.pm # once (25µs+7µs) by JSON::PP::BEGIN@30 at line 30 of JSON/PP.pm # once (26µs+6µs) by JSON::PP::BEGIN@24 at line 24 of JSON/PP.pm # once (26µs+6µs) by IO::Compress::Base::Common::BEGIN@474 at line 474 of IO/Compress/Base/Common.pm # once (26µs+6µs) by U64::BEGIN@819 at line 819 of IO/Compress/Base/Common.pm # once (26µs+6µs) by MARC::File::USMARC::BEGIN@23 at line 23 of MARC/File/USMARC.pm # once (26µs+6µs) by XML::LibXML::Error::BEGIN@50 at line 50 of XML/LibXML/Error.pm # once (26µs+6µs) by MARC::Field::BEGIN@8 at line 8 of MARC/Field.pm # once (26µs+6µs) by Cache::Memcached::BEGIN@37 at line 37 of Cache/Memcached.pm # once (25µs+6µs) by XML::LibXML::BEGIN@165 at line 165 of XML/LibXML.pm # once (25µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@90 at line 90 of IO/Compress/Gzip/Constants.pm # once (25µs+6µs) by IO::Compress::Gzip::Constants::BEGIN@88 at line 88 of IO/Compress/Gzip/Constants.pm # once (26µs+6µs) by XML::LibXML::Common::BEGIN@182 at line 182 of XML/LibXML/Common.pm # once (25µs+6µs) by MARC::Charset::Constants::BEGIN@37 at line 37 of MARC/Charset/Constants.pm # once (25µs+7µs) by IO::Compress::Gzip::Constants::BEGIN@119 at line 119 of IO/Compress/Gzip/Constants.pm # once (25µs+6µs) by C4::VirtualShelves::BEGIN@30 at line 30 of /usr/share/koha/lib/C4/VirtualShelves.pm # once (25µs+6µs) by Template::Constants::BEGIN@60 at line 60 of Template/Constants.pm # once (25µs+7µs) by XML::LibXML::BEGIN@169 at line 169 of XML/LibXML.pm # once (26µs+6µs) by XML::LibXML::BEGIN@166 at line 166 of XML/LibXML.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@193 at line 193 of XML/LibXML/Common.pm # once (25µs+6µs) by XML::LibXML::Common::BEGIN@190 at line 190 of XML/LibXML/Common.pm # once (25µs+6µs) by XML::LibXML::BEGIN@170 at line 170 of XML/LibXML.pm # once (25µs+6µs) by MARC::Charset::Constants::BEGIN@30 at line 30 of MARC/Charset/Constants.pm # once (24µs+7µs) by Template::Constants::BEGIN@44 at line 44 of Template/Constants.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@166 at line 166 of XML/LibXML/Common.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@191 at line 191 of XML/LibXML/Common.pm # once (25µs+6µs) by XML::LibXML::Common::BEGIN@183 at line 183 of XML/LibXML/Common.pm # once (25µs+6µs) by JSON::PP::IncrParser::BEGIN@1355 at line 1355 of JSON/PP.pm # once (25µs+6µs) by JSON::PP::BEGIN@31 at line 31 of JSON/PP.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@174 at line 174 of XML/LibXML/Common.pm # once (25µs+6µs) by MARC::Charset::Constants::BEGIN@26 at line 26 of MARC/Charset/Constants.pm # once (25µs+6µs) by Template::Constants::BEGIN@54 at line 54 of Template/Constants.pm # once (25µs+6µs) by IO::Compress::Gzip::Constants::BEGIN@78 at line 78 of IO/Compress/Gzip/Constants.pm # once (25µs+6µs) by Compress::Raw::Zlib::BEGIN@86 at line 86 of Compress/Raw/Zlib.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@186 at line 186 of XML/LibXML/Common.pm # once (25µs+6µs) by Compress::Zlib::BEGIN@57 at line 57 of Compress/Zlib.pm # once (25µs+6µs) by MARC::Charset::Constants::BEGIN@46 at line 46 of MARC/Charset/Constants.pm # once (25µs+6µs) by JSON::PP::BEGIN@32 at line 32 of JSON/PP.pm # once (25µs+6µs) by JSON::PP::BEGIN@23 at line 23 of JSON/PP.pm # once (25µs+7µs) by XML::LibXML::Common::BEGIN@192 at line 192 of XML/LibXML/Common.pm # once (25µs+6µs) by XML::LibXML::BEGIN@173 at line 173 of XML/LibXML.pm # once (25µs+6µs) by XML::LibXML::BEGIN@171 at line 171 of XML/LibXML.pm # once (25µs+6µs) by JSON::PP::BEGIN@35 at line 35 of JSON/PP.pm # once (25µs+6µs) by Cache::Memcached::GetParser::BEGIN@10 at line 10 of Cache/Memcached/GetParser.pm # once (27µs+4µs) by DateTime::BEGIN@71 at line 71 of DateTime.pm # once (25µs+6µs) by Template::Constants::BEGIN@51 at line 51 of Template/Constants.pm # once (25µs+6µs) by Cache::Memcached::GetParser::BEGIN@11 at line 11 of Cache/Memcached/GetParser.pm # once (25µs+6µs) by JSON::PP::BEGIN@25 at line 25 of JSON/PP.pm # once (24µs+6µs) by Compress::Raw::Zlib::BEGIN@115 at line 115 of Compress/Raw/Zlib.pm # once (24µs+6µs) by XML::LibXML::Error::BEGIN@53 at line 53 of XML/LibXML/Error.pm # once (25µs+6µs) by Template::Constants::BEGIN@68 at line 68 of Template/Constants.pm # once (25µs+6µs) by Template::Constants::BEGIN@59 at line 59 of Template/Constants.pm # once (25µs+6µs) by IO::Compress::Base::Common::BEGIN@466 at line 466 of IO/Compress/Base/Common.pm # once (25µs+6µs) by Template::Constants::BEGIN@58 at line 58 of Template/Constants.pm # once (25µs+6µs) by XML::LibXML::BEGIN@178 at line 178 of XML/LibXML.pm # once (24µs+6µs) by Template::Constants::BEGIN@57 at line 57 of Template/Constants.pm # once (24µs+6µs) by JSON::PP::BEGIN@27 at line 27 of JSON/PP.pm # once (24µs+6µs) by Template::Constants::BEGIN@73 at line 73 of Template/Constants.pm # once (24µs+6µs) by JSON::PP::IncrParser::BEGIN@1357 at line 1357 of JSON/PP.pm # once (24µs+6µs) by JSON::PP::IncrParser::BEGIN@1358 at line 1358 of JSON/PP.pm # once (24µs+6µs) by Cache::Memcached::GetParser::BEGIN@13 at line 13 of Cache/Memcached/GetParser.pm # once (24µs+6µs) by IO::Compress::Base::Common::BEGIN@475 at line 475 of IO/Compress/Base/Common.pm # once (24µs+6µs) by XML::SAX::BEGIN@22 at line 22 of XML/SAX.pm # once (24µs+6µs) by Cache::Memcached::GetParser::BEGIN@12 at line 12 of Cache/Memcached/GetParser.pm # once (24µs+6µs) by Cache::Memcached::GetParser::BEGIN@14 at line 14 of Cache/Memcached/GetParser.pm # once (24µs+6µs) by Template::Constants::BEGIN@61 at line 61 of Template/Constants.pm # once (24µs+6µs) by Cache::Memcached::GetParser::BEGIN@15 at line 15 of Cache/Memcached/GetParser.pm # once (24µs+6µs) by Compress::Raw::Zlib::BEGIN@87 at line 87 of Compress/Raw/Zlib.pm # once (24µs+6µs) by Template::Constants::BEGIN@49 at line 49 of Template/Constants.pm # once (23µs+6µs) by Template::Constants::BEGIN@50 at line 50 of Template/Constants.pm
sub import {
29807817.7ms my $class = shift;
30 return unless @_; # Ignore 'use constant;'
31 my $constants;
32 my $multiple = ref $_[0];
33 my $pkg = caller;
34 my $symtab;
35 my $str_end = $] >= 5.006 ? "\\z" : "\\Z";
36
37 if ($] > 5.009002) {
383587µs275µs
# spent 48µs (21+27) within constant::BEGIN@38 which was called: # once (21µs+27µs) by Cache::Memcached::GetParser::BEGIN@8 at line 38
no strict 'refs';
# spent 48µs making 1 call to constant::BEGIN@38 # spent 27µs making 1 call to strict::unimport
39 $symtab = \%{$pkg . '::'};
40 };
41
42 if ( $multiple ) {
43 if (ref $_[0] ne 'HASH') {
44 require Carp;
45 Carp::croak("Invalid reference type '".ref(shift)."' not 'HASH'");
46 }
47 $constants = shift;
48 } else {
49 $constants->{+shift} = undef;
50 }
51
52 foreach my $name ( keys %$constants ) {
53 unless (defined $name) {
54 require Carp;
55 Carp::croak("Can't use undef as constant name");
56 }
57
58 # Normal constant name
597241.88ms if ($name =~ /^_?[^\W_0-9]\w*$str_end/ and !$forbidden{$name}) {
# spent 1.40ms making 362 calls to constant::CORE:match, avg 4µs/call # spent 479µs making 362 calls to constant::CORE:regcomp, avg 1µs/call
60 # Everything is okay
61
62 # Name forced into main, but we're not in main. Fatal.
63 } elsif ($forced_into_main{$name} and $pkg ne 'main') {
64 require Carp;
65 Carp::croak("Constant name '$name' is forced into main::");
66
67 # Starts with double underscore. Fatal.
68 } elsif ($name =~ /^__/) {
69 require Carp;
70 Carp::croak("Constant name '$name' begins with '__'");
71
72 # Maybe the name is tolerable
73 } elsif ($name =~ /^[A-Za-z_]\w*$str_end/) {
74 # Then we'll warn only if you've asked for warnings
75 if (warnings::enabled()) {
76 if ($keywords{$name}) {
77 warnings::warn("Constant name '$name' is a Perl keyword");
78 } elsif ($forced_into_main{$name}) {
79 warnings::warn("Constant name '$name' is " .
80 "forced into package main::");
81 }
82 }
83
84 # Looks like a boolean
85 # use constant FRED == fred;
86 } elsif ($name =~ /^[01]?$str_end/) {
87 require Carp;
88 if (@_) {
89 Carp::croak("Constant name '$name' is invalid");
90 } else {
91 Carp::croak("Constant name looks like boolean value");
92 }
93
94 } else {
95 # Must have bad characters
96 require Carp;
97 Carp::croak("Constant name '$name' has invalid characters");
98 }
99
100 {
1013411µs268µs
# spent 43µs (17+25) within constant::BEGIN@101 which was called: # once (17µs+25µs) by Cache::Memcached::GetParser::BEGIN@8 at line 101
no strict 'refs';
# spent 43µs making 1 call to constant::BEGIN@101 # spent 25µs making 1 call to strict::unimport
102 my $full_name = "${pkg}::$name";
103 $declared{$full_name}++;
104 if ($multiple || @_ == 1) {
105 my $scalar = $multiple ? $constants->{$name} : $_[0];
106 if ($symtab && !exists $symtab->{$name}) {
107 # No typeglob yet, so we can use a reference as space-
108 # efficient proxy for a constant subroutine
109 # The check in Perl_ck_rvconst knows that inlinable
110 # constants from cv_const_sv are read only. So we have to:
111358548µs Internals::SvREADONLY($scalar, 1);
# spent 548µs making 358 calls to Internals::SvREADONLY, avg 2µs/call
112 $symtab->{$name} = \$scalar;
113358862µs mro::method_changed_in($pkg);
# spent 862µs making 358 calls to mro::method_changed_in, avg 2µs/call
114 } else {
115 *$full_name = sub () { $scalar };
116 }
117 } elsif (@_) {
118 my @list = @_;
11916µs
# spent 3µs within constant::__ANON__[/usr/share/perl/5.10/constant.pm:119] which was called: # once (3µs+0s) by C4::Tags::BEGIN@30 at line 30 of /usr/share/koha/lib/C4/Tags.pm
*$full_name = sub () { @list };
120 } else {
121 *$full_name = sub () { };
122 }
123 }
124 }
125}
126
127113µs1;
128
129__END__
 
# spent 1.40ms within constant::CORE:match which was called 362 times, avg 4µs/call: # 362 times (1.40ms+0s) by constant::import at line 59, avg 4µs/call
sub constant::CORE:match; # opcode
# spent 479µs within constant::CORE:regcomp which was called 362 times, avg 1µs/call: # 362 times (479µs+0s) by constant::import at line 59, avg 1µs/call
sub constant::CORE:regcomp; # opcode