← 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:28 2013

Filename/usr/share/perl/5.10/warnings.pm
StatementsExecuted 2237 statements in 5.30ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1461441403.05ms3.05mswarnings::::importwarnings::import
1111.97ms2.11mswarnings::::_error_locwarnings::_error_loc
313124891µs891µswarnings::::unimportwarnings::unimport
11142µs2.25mswarnings::::__chkwarnings::__chk
11131µs31µswarnings::::CORE:regcompwarnings::CORE:regcomp (opcode)
11119µs2.27mswarnings::::enabledwarnings::enabled
11111µs11µswarnings::::CORE:matchwarnings::CORE:match (opcode)
0000s0swarnings::::Croakerwarnings::Croaker
0000s0swarnings::::bitswarnings::bits
0000s0swarnings::::warnwarnings::warn
0000s0swarnings::::warnifwarnings::warnif
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# -*- buffer-read-only: t -*-
2# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
3# This file was created by warnings.pl
4# Any changes made here will be lost.
5#
6
7package warnings;
8
911µsour $VERSION = '1.06';
10
11# Verify that we're called correctly so that warnings will work.
12# see also strict.pm.
13166µs242µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 31µs making 1 call to warnings::CORE:regcomp # spent 11µs making 1 call to warnings::CORE:match
14 my (undef, $f, $l) = caller;
15 die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
16}
17
18126µsour %Offsets = (
19
20 # Warnings Categories added in Perl 5.008
21
22 'all' => 0,
23 'closure' => 2,
24 'deprecated' => 4,
25 'exiting' => 6,
26 'glob' => 8,
27 'io' => 10,
28 'closed' => 12,
29 'exec' => 14,
30 'layer' => 16,
31 'newline' => 18,
32 'pipe' => 20,
33 'unopened' => 22,
34 'misc' => 24,
35 'numeric' => 26,
36 'once' => 28,
37 'overflow' => 30,
38 'pack' => 32,
39 'portable' => 34,
40 'recursion' => 36,
41 'redefine' => 38,
42 'regexp' => 40,
43 'severe' => 42,
44 'debugging' => 44,
45 'inplace' => 46,
46 'internal' => 48,
47 'malloc' => 50,
48 'signal' => 52,
49 'substr' => 54,
50 'syntax' => 56,
51 'ambiguous' => 58,
52 'bareword' => 60,
53 'digit' => 62,
54 'parenthesis' => 64,
55 'precedence' => 66,
56 'printf' => 68,
57 'prototype' => 70,
58 'qw' => 72,
59 'reserved' => 74,
60 'semicolon' => 76,
61 'taint' => 78,
62 'threads' => 80,
63 'uninitialized' => 82,
64 'unpack' => 84,
65 'untie' => 86,
66 'utf8' => 88,
67 'void' => 90,
68 );
69
70113µsour %Bits = (
71 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05", # [0..45]
72 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [29]
73 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [30]
74 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
75 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
76 'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [22]
77 'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
78 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [31]
79 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
80 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
81 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
82 'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [23]
83 'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [24]
84 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5..11]
85 'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
86 'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [25]
87 'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
88 'newline' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
89 'numeric' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
90 'once' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
91 'overflow' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
92 'pack' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [16]
93 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [32]
94 'pipe' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
95 'portable' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [17]
96 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [33]
97 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [34]
98 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [35]
99 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [36]
100 'recursion' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [18]
101 'redefine' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [19]
102 'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [20]
103 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [37]
104 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [38]
105 'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00", # [21..25]
106 'signal' => "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [26]
107 'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [27]
108 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x00", # [28..38]
109 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [39]
110 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [40]
111 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [41]
112 'unopened' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
113 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [42]
114 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [43]
115 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [44]
116 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [45]
117 );
118
119116µsour %DeadBits = (
120 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x0a", # [0..45]
121 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [29]
122 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [30]
123 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
124 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
125 'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [22]
126 'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
127 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [31]
128 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
129 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
130 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
131 'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [23]
132 'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [24]
133 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5..11]
134 'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
135 'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [25]
136 'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
137 'newline' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
138 'numeric' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
139 'once' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
140 'overflow' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
141 'pack' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [16]
142 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [32]
143 'pipe' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
144 'portable' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [17]
145 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [33]
146 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [34]
147 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [35]
148 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [36]
149 'recursion' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [18]
150 'redefine' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [19]
151 'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [20]
152 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [37]
153 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [38]
154 'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00", # [21..25]
155 'signal' => "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [26]
156 'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [27]
157 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x00", # [28..38]
158 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [39]
159 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [40]
160 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [41]
161 'unopened' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
162 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [42]
163 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [43]
164 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [44]
165 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [45]
166 );
167
1681300ns$NONE = "\0\0\0\0\0\0\0\0\0\0\0\0";
1691300ns$LAST_BIT = 92 ;
1701200ns$BYTES = 12 ;
171
172218µs$All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
173
174sub Croaker
175{
176 require Carp::Heavy; # this initializes %CarpInternal
177 local $Carp::CarpInternal{'warnings'};
178 delete $Carp::CarpInternal{'warnings'};
179 Carp::croak(@_);
180}
181
182sub bits
183{
184 # called from B::Deparse.pm
185
186 push @_, 'all' unless @_;
187
188 my $mask;
189 my $catmask ;
190 my $fatal = 0 ;
191 my $no_fatal = 0 ;
192
193 foreach my $word ( @_ ) {
194 if ($word eq 'FATAL') {
195 $fatal = 1;
196 $no_fatal = 0;
197 }
198 elsif ($word eq 'NONFATAL') {
199 $fatal = 0;
200 $no_fatal = 1;
201 }
202 elsif ($catmask = $Bits{$word}) {
203 $mask |= $catmask ;
204 $mask |= $DeadBits{$word} if $fatal ;
205 $mask &= ~($DeadBits{$word}|$All) if $no_fatal ;
206 }
207 else
208 { Croaker("Unknown warnings category '$word'")}
209 }
210
211 return $mask ;
212}
213
214sub import
215
# spent 3.05ms within warnings::import which was called 146 times, avg 21µs/call: # 3 times (69µs+0s) by Modern::Perl::import at line 24 of Modern/Perl.pm, avg 23µs/call # once (65µs+0s) by Encode::Config::BEGIN@8 at line 8 of Encode/Config.pm # once (60µs+0s) by Template::Iterator::BEGIN@25 at line 25 of Template/Iterator.pm # once (40µs+0s) by utf8::BEGIN@3 at line 3 of utf8_heavy.pl # once (40µs+0s) by GDBM_File::BEGIN@45 at line 45 of GDBM_File.pm # once (39µs+0s) by C4::XSLT::BEGIN@24 at line 24 of /usr/share/koha/lib/C4/XSLT.pm # once (38µs+0s) by C4::Auth_with_cas::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Auth_with_cas.pm # once (38µs+0s) by C4::Context::BEGIN@2 at line 2 of ZOOM.pm # once (38µs+0s) by C4::Members::Attributes::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Members/Attributes.pm # once (35µs+0s) by C4::Boolean::BEGIN@25 at line 25 of /usr/share/koha/lib/C4/Boolean.pm # once (35µs+0s) by YAML::Types::BEGIN@4 at line 4 of YAML/Types.pm # once (35µs+0s) by MARC::File::Encode::BEGIN@20 at line 20 of MARC/File/Encode.pm # once (34µs+0s) by Library::CallNumber::LC::BEGIN@247 at line 247 of Library/CallNumber/LC.pm # once (34µs+0s) by C4::Linker::BEGIN@46 at line 46 of /usr/share/koha/lib/C4/Linker.pm # once (34µs+0s) by IO::Uncompress::Gunzip::BEGIN@9 at line 9 of IO/Uncompress/Gunzip.pm # once (33µs+0s) by Encode::BEGIN@6 at line 6 of Encode.pm # once (32µs+0s) by C4::Stats::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/Stats.pm # once (32µs+0s) by IO::BEGIN@8 at line 8 of IO.pm # once (31µs+0s) by Koha::QueryParser::Driver::PQF::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF.pm # once (30µs+0s) by Template::Parser::BEGIN@36 at line 36 of Template/Parser.pm # once (29µs+0s) by Template::Filters::BEGIN@23 at line 23 of Template/Filters.pm # once (28µs+0s) by MARC::Charset::BEGIN@5 at line 5 of MARC/Charset.pm # once (28µs+0s) by YAML::BEGIN@5 at line 5 of YAML.pm # once (27µs+0s) by C4::Members::Messaging::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Members/Messaging.pm # once (27µs+0s) by Template::Plugins::BEGIN@27 at line 27 of Template/Plugins.pm # once (27µs+0s) by Sub::Name::BEGIN@45 at line 45 of Sub/Name.pm # once (27µs+0s) by Template::Context::BEGIN@24 at line 24 of Template/Context.pm # once (27µs+0s) by C4::Ratings::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/Ratings.pm # once (27µs+0s) by String::Random::BEGIN@18 at line 18 of String/Random.pm # once (27µs+0s) by DateTime::Infinite::BEGIN@7 at line 7 of DateTime/Infinite.pm # once (26µs+0s) by DateTime::TimeZone::Local::BEGIN@4 at line 4 of DateTime/TimeZone/Local.pm # once (26µs+0s) by C4::VirtualShelves::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/VirtualShelves.pm # once (26µs+0s) by C4::Tags::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/Tags.pm # once (26µs+0s) by Template::Stash::XS::BEGIN@15 at line 15 of Template/Stash/XS.pm # once (26µs+0s) by Date::Manip::Date::BEGIN@18 at line 18 of Date/Manip/Date.pm # once (25µs+0s) by Readonly::XS::BEGIN@19 at line 19 of Readonly/XS.pm # once (25µs+0s) by YAML::Loader::BEGIN@4 at line 4 of YAML/Loader.pm # once (25µs+0s) by Template::BEGIN@23 at line 23 of Template.pm # once (25µs+0s) by Date::Manip::Recur::BEGIN@18 at line 18 of Date/Manip/Recur.pm # once (25µs+0s) by DateTime::BEGIN@9 at line 9 of DateTime.pm # once (25µs+0s) by IO::Compress::Base::Common::BEGIN@4 at line 4 of IO/Compress/Base/Common.pm # once (25µs+0s) by C4::ClassSortRoutine::Dewey::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/ClassSortRoutine/Dewey.pm # once (25µs+0s) by Modern::Perl::BEGIN@18 at line 18 of Modern/Perl.pm # once (25µs+0s) by C4::Charset::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Charset.pm # once (25µs+0s) by Net::Z3950::ZOOM::BEGIN@5 at line 5 of Net/Z3950/ZOOM.pm # once (25µs+0s) by Template::Service::BEGIN@24 at line 24 of Template/Service.pm # once (24µs+0s) by C4::ClassSortRoutine::Generic::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/ClassSortRoutine/Generic.pm # once (24µs+0s) by Date::Manip::Delta::BEGIN@18 at line 18 of Date/Manip/Delta.pm # once (24µs+0s) by C4::ItemCirculationAlertPreference::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/ItemCirculationAlertPreference.pm # once (24µs+0s) by base::BEGIN@2 at line 2 of /usr/share/koha/lib/OpenILS/QueryParser.pm # once (24µs+0s) by Date::Manip::Obj::BEGIN@10 at line 10 of Date/Manip/Obj.pm # once (24µs+0s) by C4::NewsChannels::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/NewsChannels.pm # once (24µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@4 at line 4 of IO/Uncompress/Adapter/Inflate.pm # once (24µs+0s) by YAML::Base::BEGIN@4 at line 4 of YAML/Base.pm # once (24µs+0s) by Date::Manip::Lang::english::BEGIN@27 at line 27 of Date/Manip/Lang/english.pm # once (23µs+0s) by DateTime::Locale::Catalog::BEGIN@18 at line 18 of DateTime/Locale/Catalog.pm # once (23µs+0s) by Hash::Util::BEGIN@6 at line 6 of Hash/Util.pm # once (23µs+0s) by MARC::Charset::Table::BEGIN@35 at line 35 of MARC/Charset/Table.pm # once (23µs+0s) by Params::Validate::BEGIN@4 at line 4 of Params/ValidateXS.pm # once (23µs+0s) by C4::ClassSource::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/ClassSource.pm # once (22µs+0s) by Cache::Memcached::GetParser::BEGIN@3 at line 3 of Cache/Memcached/GetParser.pm # once (22µs+0s) by IO::Compress::Base::Common::BEGIN@502 at line 502 of IO/Compress/Base/Common.pm # once (22µs+0s) by Date::Manip::Lang::index::BEGIN@25 at line 25 of Date/Manip/Lang/index.pm # once (22µs+0s) by IO::Compress::Base::BEGIN@7 at line 7 of IO/Compress/Base.pm # once (21µs+0s) by C4::Auth::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Auth.pm # once (21µs+0s) by C4::SQLHelper::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/SQLHelper.pm # once (21µs+0s) by Date::Manip::TZ::etgmt00::BEGIN@31 at line 31 of Date/Manip/TZ/etgmt00.pm # once (21µs+0s) by mro::BEGIN@11 at line 11 of mro.pm # once (21µs+0s) by C4::Templates::BEGIN@4 at line 4 of /usr/share/koha/lib/C4/Templates.pm # once (20µs+0s) by YAML::Loader::Base::BEGIN@4 at line 4 of YAML/Loader/Base.pm # once (20µs+0s) by C4::SMS::BEGIN@36 at line 36 of /usr/share/koha/lib/C4/SMS.pm # once (19µs+0s) by C4::Dates::BEGIN@23 at line 23 of /usr/share/koha/lib/C4/Dates.pm # once (19µs+0s) by Memoize::Memcached::BEGIN@4 at line 4 of Memoize/Memcached.pm # once (19µs+0s) by IO::Compress::Gzip::BEGIN@7 at line 7 of IO/Compress/Gzip.pm # once (19µs+0s) by Cache::Memcached::BEGIN@11 at line 11 of Cache/Memcached.pm # once (18µs+0s) by Date::Manip::BEGIN@56 at line 56 of Date/Manip.pm # once (18µs+0s) by MARC::File::XML::BEGIN@3 at line 3 of MARC/File/XML.pm # once (17µs+0s) by IO::Compress::Adapter::Deflate::BEGIN@4 at line 4 of IO/Compress/Adapter/Deflate.pm # once (17µs+0s) by Date::Manip::TZ::BEGIN@596 at line 596 of Date/Manip/TZ.pm # once (17µs+0s) by C4::Log::BEGIN@25 at line 25 of /usr/share/koha/lib/C4/Log.pm # once (17µs+0s) by Template::Config::BEGIN@22 at line 22 of Template/Config.pm # once (17µs+0s) by File::GlobMapper::BEGIN@4 at line 4 of File/GlobMapper.pm # once (17µs+0s) by C4::Letters::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Letters.pm # once (17µs+0s) by Encode::Alias::BEGIN@3 at line 3 of Encode/Alias.pm # once (17µs+0s) by Compress::Zlib::BEGIN@17 at line 17 of Compress/Zlib.pm # once (16µs+0s) by IO::Compress::Zlib::Extra::BEGIN@6 at line 6 of IO/Compress/Zlib/Extra.pm # once (16µs+0s) by charnames::BEGIN@3 at line 3 of charnames.pm # once (16µs+0s) by Date::Manip::Zones::BEGIN@17 at line 17 of Date/Manip/Zones.pm # once (15µs+0s) by re::BEGIN@5 at line 5 of re.pm # once (15µs+0s) by DateTime::TimeZone::BEGIN@6 at line 6 of DateTime/TimeZone.pm # once (15µs+0s) by DateTime::Locale::BEGIN@4 at line 4 of DateTime/Locale.pm # once (15µs+0s) by Template::Grammar::BEGIN@34 at line 34 of Template/Grammar.pm # once (14µs+0s) by Date::Manip::TZ::BEGIN@18 at line 18 of Date/Manip/TZ.pm # once (14µs+0s) by C4::Debug::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/Debug.pm # once (14µs+0s) by Koha::DateUtils::BEGIN@20 at line 20 of /usr/share/koha/lib/Koha/DateUtils.pm # once (14µs+0s) by Date::Manip::Base::BEGIN@19 at line 19 of Date/Manip/Base.pm # once (14µs+0s) by C4::Utils::BEGIN@25 at line 25 of /usr/share/koha/lib/C4/Utils.pm # once (14µs+0s) by MARC::Charset::Constants::BEGIN@19 at line 19 of MARC/Charset/Constants.pm # once (14µs+0s) by DateTime::Locale::en_US::BEGIN@22 at line 22 of DateTime/Locale/en_US.pm # once (14µs+0s) by IO::Compress::Gzip::Constants::BEGIN@4 at line 4 of IO/Compress/Gzip/Constants.pm # once (14µs+0s) by Template::Directive::BEGIN@30 at line 30 of Template/Directive.pm # once (14µs+0s) by Template::Provider::BEGIN@42 at line 42 of Template/Provider.pm # once (14µs+0s) by Authen::CAS::Client::BEGIN@6 at line 6 of Authen/CAS/Client.pm # once (14µs+0s) by C4::Message::BEGIN@23 at line 23 of /usr/share/koha/lib/C4/Message.pm # once (14µs+0s) by IO::Uncompress::RawInflate::BEGIN@5 at line 5 of IO/Uncompress/RawInflate.pm # once (14µs+0s) by C4::ClassSortRoutine::LCC::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/ClassSortRoutine/LCC.pm # once (14µs+0s) by Koha::Calendar::BEGIN@3 at line 3 of /usr/share/koha/lib/Koha/Calendar.pm # once (13µs+0s) by Template::Stash::BEGIN@23 at line 23 of Template/Stash.pm # once (13µs+0s) by Encode::Encoding::BEGIN@5 at line 5 of Encode/Encoding.pm # once (13µs+0s) by Compress::Raw::Zlib::BEGIN@12 at line 12 of Compress/Raw/Zlib.pm # once (13µs+0s) by POSIX::BEGIN@3 at line 3 of POSIX.pm # once (13µs+0s) by Text::CSV_XS::BEGIN@27 at line 27 of Text/CSV_XS.pm # once (13µs+0s) by Koha::QueryParser::Driver::PQF::query_plan::node::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/query_plan/node.pm # once (13µs+0s) by Algorithm::CheckDigits::BEGIN@6 at line 6 of Algorithm/CheckDigits.pm # once (13µs+0s) by Template::Base::BEGIN@23 at line 23 of Template/Base.pm # once (13µs+0s) by DateTime::Duration::BEGIN@7 at line 7 of DateTime/Duration.pm # once (13µs+0s) by Koha::QueryParser::Driver::PQF::query_plan::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/query_plan.pm # once (13µs+0s) by C4::ItemType::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/ItemType.pm # once (13µs+0s) by DateTime::Locale::Base::BEGIN@4 at line 4 of DateTime/Locale/Base.pm # once (13µs+0s) by Koha::QueryParser::Driver::PQF::query_plan::facet::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/query_plan/facet.pm # once (13µs+0s) by IO::Uncompress::Base::BEGIN@5 at line 5 of IO/Uncompress/Base.pm # once (13µs+0s) by C4::Biblio::BEGIN@23 at line 23 of /usr/share/koha/lib/C4/Biblio.pm # once (13µs+0s) by Unicode::Normalize::BEGIN@11 at line 11 of Unicode/Normalize.pm # once (13µs+0s) by YAML::Node::BEGIN@4 at line 4 of YAML/Node.pm # once (12µs+0s) by MARC::Charset::Code::BEGIN@4 at line 4 of MARC/Charset/Code.pm # once (12µs+0s) by Library::CallNumber::LC::BEGIN@3 at line 3 of Library/CallNumber/LC.pm # once (12µs+0s) by Koha::QueryParser::Driver::PQF::query_plan::filter::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/query_plan/filter.pm # once (12µs+0s) by C4::Category::BEGIN@22 at line 22 of /usr/share/koha/lib/C4/Category.pm # once (12µs+0s) by Koha::QueryParser::Driver::PQF::query_plan::node::atom::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm # once (12µs+0s) by Template::Constants::BEGIN@23 at line 23 of Template/Constants.pm # once (12µs+0s) by DateTime::Helpers::BEGIN@7 at line 7 of DateTime/Helpers.pm # once (12µs+0s) by DateTime::Locale::root::BEGIN@22 at line 22 of DateTime/Locale/root.pm # once (12µs+0s) by File::Basename::BEGIN@52 at line 52 of File/Basename.pm # once (12µs+0s) by DateTime::Locale::en::BEGIN@22 at line 22 of DateTime/Locale/en.pm # once (12µs+0s) by Koha::QueryParser::Driver::PQF::query_plan::modifier::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/query_plan/modifier.pm # once (12µs+0s) by Template::Exception::BEGIN@23 at line 23 of Template/Exception.pm # once (12µs+0s) by Template::Document::BEGIN@25 at line 25 of Template/Document.pm # once (12µs+0s) by Koha::QueryParser::Driver::PQF::Util::BEGIN@5 at line 5 of /usr/share/koha/lib/Koha/QueryParser/Driver/PQF/Util.pm # once (12µs+0s) by IO::Compress::RawDeflate::BEGIN@6 at line 6 of IO/Compress/RawDeflate.pm # once (12µs+0s) by Template::VMethods::BEGIN@25 at line 25 of Template/VMethods.pm # once (12µs+0s) by C4::ClassSortRoutine::BEGIN@21 at line 21 of /usr/share/koha/lib/C4/ClassSortRoutine.pm # once (12µs+0s) by YAML::Tag::BEGIN@4 at line 4 of YAML/Tag.pm # once (11µs+0s) by Authen::CAS::Client::BEGIN@4 at line 4 of Authen/CAS/Client/Response.pm # once (11µs+0s) by C4::Context::BEGIN@20 at line 20 of /usr/share/koha/lib/C4/Context.pm
{
21613142.97ms shift;
217
218 my $catmask ;
219 my $fatal = 0 ;
220 my $no_fatal = 0 ;
221
222 my $mask = ${^WARNING_BITS} ;
223
22423µs if (vec($mask, $Offsets{'all'}, 1)) {
225 $mask |= $Bits{'all'} ;
226 $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
227 }
228
229 push @_, 'all' unless @_;
230
231 foreach my $word ( @_ ) {
232584845µs if ($word eq 'FATAL') {
233 $fatal = 1;
234 $no_fatal = 0;
235 }
236 elsif ($word eq 'NONFATAL') {
237 $fatal = 0;
238 $no_fatal = 1;
239 }
240 elsif ($catmask = $Bits{$word}) {
241 $mask |= $catmask ;
242 $mask |= $DeadBits{$word} if $fatal ;
243 $mask &= ~($DeadBits{$word}|$All) if $no_fatal ;
244 }
245 else
246 { Croaker("Unknown warnings category '$word'")}
247 }
248
249 ${^WARNING_BITS} = $mask ;
250}
251
252sub unimport
253
# spent 891µs within warnings::unimport which was called 31 times, avg 29µs/call: # once (60µs+0s) by Exporter::Heavy::BEGIN@186 at line 186 of Exporter/Heavy.pm # once (53µs+0s) by IO::Uncompress::Base::BEGIN@413 at line 413 of IO/Uncompress/Base.pm # once (50µs+0s) by Library::CallNumber::LC::BEGIN@241 at line 241 of Library/CallNumber/LC.pm # once (39µs+0s) by OpenILS::QueryParser::_util::BEGIN@1311 at line 1311 of /usr/share/koha/lib/OpenILS/QueryParser.pm # once (37µs+0s) by IO::Uncompress::Base::BEGIN@94 at line 94 of IO/Uncompress/Base.pm # once (37µs+0s) by Date::Manip::TZ::BEGIN@586 at line 586 of Date/Manip/TZ.pm # once (36µs+0s) by utf8::BEGIN@211 at line 211 of utf8_heavy.pl # once (33µs+0s) by C4::Context::BEGIN@1203 at line 1203 of /usr/share/koha/lib/C4/Context.pm # once (32µs+0s) by Template::VMethods::BEGIN@110 at line 110 of Template/VMethods.pm # once (31µs+0s) by C4::Auth::BEGIN@1630 at line 1630 of /usr/share/koha/lib/C4/Auth.pm # once (31µs+0s) by B::Deparse::BEGIN@3338 at line 3338 of B/Deparse.pm # once (30µs+0s) by Library::CallNumber::LC::BEGIN@277 at line 277 of Library/CallNumber/LC.pm # once (29µs+0s) by Unicode::Normalize::BEGIN@14 at line 14 of Unicode/Normalize.pm # once (28µs+0s) by Date::Manip::Base::BEGIN@1845 at line 1845 of Date/Manip/Base.pm # once (28µs+0s) by Encode::BEGIN@226 at line 226 of Encode.pm # once (27µs+0s) by autouse::BEGIN@56 at line 56 of autouse.pm # once (25µs+0s) by Template::Base::BEGIN@45 at line 45 of Template/Base.pm # once (25µs+0s) by YAML::Base::BEGIN@165 at line 165 of YAML/Base.pm # once (25µs+0s) by File::GlobMapper::BEGIN@341 at line 341 of File/GlobMapper.pm # once (24µs+0s) by Template::VMethods::BEGIN@104 at line 104 of Template/VMethods.pm # once (23µs+0s) by Template::VMethods::BEGIN@412 at line 412 of Template/VMethods.pm # once (22µs+0s) by IO::Compress::Base::BEGIN@264 at line 264 of IO/Compress/Base.pm # once (22µs+0s) by Template::VMethods::BEGIN@379 at line 379 of Template/VMethods.pm # once (22µs+0s) by Readonly::XS::BEGIN@32 at line 32 of Readonly/XS.pm # once (21µs+0s) by Encode::Alias::BEGIN@4 at line 4 of Encode/Alias.pm # once (21µs+0s) by POSIX::BEGIN@40 at line 40 of POSIX.pm # once (20µs+0s) by charnames::BEGIN@183 at line 183 of charnames.pm # once (17µs+0s) by YAML::BEGIN@40 at line 40 of YAML.pm # once (15µs+0s) by Carp::BEGIN@290 at line 290 of Carp/Heavy.pm # once (13µs+0s) by Template::VMethods::BEGIN@406 at line 406 of Template/VMethods.pm # once (13µs+0s) by Readonly::XS::BEGIN@46 at line 46 of Readonly/XS.pm
{
254217795µs shift;
255
256 my $catmask ;
257 my $mask = ${^WARNING_BITS} ;
258
25954100µs if (vec($mask, $Offsets{'all'}, 1)) {
260 $mask |= $Bits{'all'} ;
261 $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
262 }
263
264 push @_, 'all' unless @_;
265
266 foreach my $word ( @_ ) {
26732213µs if ($word eq 'FATAL') {
268 next;
269 }
270 elsif ($catmask = $Bits{$word}) {
271 $mask &= ~($catmask | $DeadBits{$word} | $All);
272 }
273 else
274 { Croaker("Unknown warnings category '$word'")}
275 }
276
277 ${^WARNING_BITS} = $mask ;
278}
279
28025µsmy %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE Regexp)} = ();
281
282sub __chk
283
# spent 2.25ms (42µs+2.21) within warnings::__chk which was called: # once (42µs+2.21ms) by warnings::enabled at line 336
{
2841032µs my $category ;
285 my $offset ;
286 my $isobj = 0 ;
287
28844µs if (@_) {
289 # check the category supplied.
290 $category = shift ;
291 if (my $type = ref $category) {
292 Croaker("not an object")
293 if exists $builtin_type{$type};
294 $category = $type;
295 $isobj = 1 ;
296 }
297 $offset = $Offsets{$category};
298 Croaker("Unknown warnings category '$category'")
299 unless defined $offset;
300 }
301 else {
302 $category = (caller(1))[0] ;
303 $offset = $Offsets{$category};
304 Croaker("package '$category' not registered for warnings")
305 unless defined $offset ;
306 }
307
308 my $this_pkg = (caller(1))[0] ;
309 my $i = 2 ;
310 my $pkg ;
311
31213µs if ($isobj) {
313 while (do { { package DB; $pkg = (caller($i++))[0] } } ) {
314 last unless @DB::args && $DB::args[0] =~ /^$category=/ ;
315 }
316 $i -= 2 ;
317 }
318 else {
31912.11ms $i = _error_loc(); # see where Carp will allocate the error
# spent 2.11ms making 1 call to warnings::_error_loc
320 }
321
322 my $callers_bitmask = (caller($i))[9] ;
323 return ($callers_bitmask, $offset, $i) ;
324}
325
326
# spent 2.11ms (1.97+138µs) within warnings::_error_loc which was called: # once (1.97ms+138µs) by warnings::__chk at line 319
sub _error_loc {
3272126µs require Carp::Heavy;
328198µs goto &Carp::short_error_loc; # don't introduce another stack frame
# spent 98µs making 1 call to Carp::short_error_loc
329}
330
331sub enabled
332
# spent 2.27ms (19µs+2.25) within warnings::enabled which was called: # once (19µs+2.25ms) by charnames::import at line 237 of charnames.pm
{
333414µs Croaker("Usage: warnings::enabled([category])")
334 unless @_ == 1 || @_ == 0 ;
335
33612.25ms my ($callers_bitmask, $offset, $i) = __chk(@_) ;
# spent 2.25ms making 1 call to warnings::__chk
337
338 return 0 unless defined $callers_bitmask ;
339 return vec($callers_bitmask, $offset, 1) ||
340 vec($callers_bitmask, $Offsets{'all'}, 1) ;
341}
342
343sub warn
344{
345 Croaker("Usage: warnings::warn([category,] 'message')")
346 unless @_ == 2 || @_ == 1 ;
347
348 my $message = pop ;
349 my ($callers_bitmask, $offset, $i) = __chk(@_) ;
350 require Carp;
351 Carp::croak($message)
352 if vec($callers_bitmask, $offset+1, 1) ||
353 vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
354 Carp::carp($message) ;
355}
356
357sub warnif
358{
359 Croaker("Usage: warnings::warnif([category,] 'message')")
360 unless @_ == 2 || @_ == 1 ;
361
362 my $message = pop ;
363 my ($callers_bitmask, $offset, $i) = __chk(@_) ;
364
365 return
366 unless defined $callers_bitmask &&
367 (vec($callers_bitmask, $offset, 1) ||
368 vec($callers_bitmask, $Offsets{'all'}, 1)) ;
369
370 require Carp;
371 Carp::croak($message)
372 if vec($callers_bitmask, $offset+1, 1) ||
373 vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
374
375 Carp::carp($message) ;
376}
377
378142µs1;
379# ex: set ro:
 
# spent 11µs within warnings::CORE:match which was called: # once (11µs+0s) by Modern::Perl::BEGIN@18 at line 13
sub warnings::CORE:match; # opcode
# spent 31µs within warnings::CORE:regcomp which was called: # once (31µs+0s) by Modern::Perl::BEGIN@18 at line 13
sub warnings::CORE:regcomp; # opcode