← 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:46 2015

Filename/usr/share/perl/5.20/warnings.pm
StatementsExecuted 1732 statements in 2.73ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
165161155965µs972µswarnings::::importwarnings::import
711486µs538µswarnings::::register_categorieswarnings::register_categories
272723381µs381µswarnings::::unimportwarnings::unimport
22152µs206µswarnings::::__chkwarnings::__chk
142152µs52µswarnings::::_mkMaskwarnings::_mkMask
11130µs30µswarnings::::CORE:regcompwarnings::CORE:regcomp (opcode)
2118µs8µswarnings::::_error_locwarnings::_error_loc
1117µs7µswarnings::::CORE:matchwarnings::CORE:match (opcode)
1117µs7µswarnings::::_bitswarnings::_bits
1115µs102µswarnings::::warnifwarnings::warnif
1115µs114µswarnings::::enabledwarnings::enabled
0000s0swarnings::::Croakerwarnings::Croaker
0000s0swarnings::::bitswarnings::bits
0000s0swarnings::::fatal_enabledwarnings::fatal_enabled
0000s0swarnings::::warnwarnings::warn
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 is built by regen/warnings.pl.
4# Any changes made here will be lost!
5
6package warnings;
7
81900nsour $VERSION = '1.23';
9
10# Verify that we're called correctly so that warnings will work.
11# see also strict.pm.
12155µs237µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 30µs making 1 call to warnings::CORE:regcomp # spent 7µs making 1 call to warnings::CORE:match
13 my (undef, $f, $l) = caller;
14 die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
15}
16
17133µsour %Offsets = (
18
19 # Warnings Categories added in Perl 5.008
20
21 'all' => 0,
22 'closure' => 2,
23 'deprecated' => 4,
24 'exiting' => 6,
25 'glob' => 8,
26 'io' => 10,
27 'closed' => 12,
28 'exec' => 14,
29 'layer' => 16,
30 'newline' => 18,
31 'pipe' => 20,
32 'unopened' => 22,
33 'misc' => 24,
34 'numeric' => 26,
35 'once' => 28,
36 'overflow' => 30,
37 'pack' => 32,
38 'portable' => 34,
39 'recursion' => 36,
40 'redefine' => 38,
41 'regexp' => 40,
42 'severe' => 42,
43 'debugging' => 44,
44 'inplace' => 46,
45 'internal' => 48,
46 'malloc' => 50,
47 'signal' => 52,
48 'substr' => 54,
49 'syntax' => 56,
50 'ambiguous' => 58,
51 'bareword' => 60,
52 'digit' => 62,
53 'parenthesis' => 64,
54 'precedence' => 66,
55 'printf' => 68,
56 'prototype' => 70,
57 'qw' => 72,
58 'reserved' => 74,
59 'semicolon' => 76,
60 'taint' => 78,
61 'threads' => 80,
62 'uninitialized' => 82,
63 'unpack' => 84,
64 'untie' => 86,
65 'utf8' => 88,
66 'void' => 90,
67
68 # Warnings Categories added in Perl 5.011
69
70 'imprecision' => 92,
71 'illegalproto' => 94,
72
73 # Warnings Categories added in Perl 5.013
74
75 'non_unicode' => 96,
76 'nonchar' => 98,
77 'surrogate' => 100,
78
79 # Warnings Categories added in Perl 5.017
80
81 'experimental' => 102,
82 'experimental::lexical_subs'=> 104,
83 'experimental::lexical_topic'=> 106,
84 'experimental::regex_sets'=> 108,
85 'experimental::smartmatch'=> 110,
86
87 # Warnings Categories added in Perl 5.019
88
89 'experimental::autoderef'=> 112,
90 'experimental::postderef'=> 114,
91 'experimental::signatures'=> 116,
92 'syscalls' => 118,
93 );
94
95116µsour %Bits = (
96 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55", # [0..59]
97 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [29]
98 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [30]
99 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
100 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
101 'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
102 'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
103 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [31]
104 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
105 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
106 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x55\x15", # [51..58]
107 'experimental::autoderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [56]
108 'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [52]
109 'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [53]
110 'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [57]
111 'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [54]
112 'experimental::signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [58]
113 'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [55]
114 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
115 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [47]
116 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [46]
117 'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
118 'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
119 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [5..11,59]
120 'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
121 'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
122 'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
123 'newline' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
124 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [48]
125 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [49]
126 'numeric' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
127 'once' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
128 'overflow' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
129 'pack' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
130 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [32]
131 'pipe' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
132 'portable' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
133 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [33]
134 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [34]
135 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [35]
136 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [36]
137 'recursion' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
138 'redefine' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
139 'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
140 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [37]
141 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [38]
142 'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
143 'signal' => "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [26]
144 'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
145 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [50]
146 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00\x00\x00", # [28..38,47]
147 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40", # [59]
148 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [39]
149 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [40]
150 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [41]
151 'unopened' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
152 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [42]
153 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [43]
154 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x15\x00\x00", # [44,48..50]
155 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [45]
156 );
157
158117µsour %DeadBits = (
159 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", # [0..59]
160 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [29]
161 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [30]
162 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
163 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
164 'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [22]
165 'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
166 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [31]
167 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
168 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
169 'experimental' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xaa\x2a", # [51..58]
170 'experimental::autoderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [56]
171 'experimental::lexical_subs'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [52]
172 'experimental::lexical_topic'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [53]
173 'experimental::postderef'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [57]
174 'experimental::regex_sets'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [54]
175 'experimental::signatures'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [58]
176 'experimental::smartmatch'=> "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [55]
177 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
178 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [47]
179 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [46]
180 'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [23]
181 'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [24]
182 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [5..11,59]
183 'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
184 'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [25]
185 'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
186 'newline' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
187 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [48]
188 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [49]
189 'numeric' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
190 'once' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
191 'overflow' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
192 'pack' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
193 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [32]
194 'pipe' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
195 'portable' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
196 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [33]
197 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [34]
198 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [35]
199 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [36]
200 'recursion' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
201 'redefine' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
202 'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [20]
203 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [37]
204 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [38]
205 'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00\x00\x00", # [21..25]
206 'signal' => "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [26]
207 'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [27]
208 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [50]
209 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00\x00\x00", # [28..38,47]
210 'syscalls' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80", # [59]
211 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [39]
212 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [40]
213 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [41]
214 'unopened' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
215 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [42]
216 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [43]
217 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x2a\x00\x00", # [44,48..50]
218 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [45]
219 );
220
2211200ns$NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
2221600ns$DEFAULT = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x00\x55\x15", # [2,56,52,53,57,54,58,55,4,22,23,25]
223$LAST_BIT = 120 ;
2241200ns$BYTES = 15 ;
225
226210µs$All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
227
228sub Croaker
229{
230 require Carp; # this initializes %CarpInternal
231 local $Carp::CarpInternal{'warnings'};
232 delete $Carp::CarpInternal{'warnings'};
233 Carp::croak(@_);
234}
235
236
# spent 7µs within warnings::_bits which was called: # once (7µs+0s) by warnings::import at line 285
sub _bits {
2371300ns my $mask = shift ;
2381100ns my $catmask ;
2391400ns my $fatal = 0 ;
2401200ns my $no_fatal = 0 ;
241
24211µs foreach my $word ( @_ ) {
24312µs if ($word eq 'FATAL') {
244 $fatal = 1;
245 $no_fatal = 0;
246 }
247 elsif ($word eq 'NONFATAL') {
248 $fatal = 0;
249 $no_fatal = 1;
250 }
251 elsif ($catmask = $Bits{$word}) {
2521900ns $mask |= $catmask ;
2531200ns $mask |= $DeadBits{$word} if $fatal ;
2541200ns $mask &= ~($DeadBits{$word}|$All) if $no_fatal ;
255 }
256 else
257 { Croaker("Unknown warnings category '$word'")}
258 }
259
26014µs return $mask ;
261}
262
263sub bits
264{
265 # called from B::Deparse.pm
266 push @_, 'all' unless @_ ;
267 return _bits(undef, @_) ;
268}
269
270sub import
271
# spent 972µs (965+7) within warnings::import which was called 165 times, avg 6µs/call: # 4 times (32µs+0s) by Modern::Perl::import at line 41 of Modern/Perl.pm, avg 8µs/call # 2 times (12µs+0s) by YAML::Mo::BEGIN@5.6 or YAML::Mo::__ANON__[/usr/share/perl5/YAML/Mo.pm:5] at line 5 of YAML/Mo.pm, avg 6µs/call # once (19µs+0s) by Date::Manip::TZ::etgmt00::BEGIN@18 at line 18 of Date/Manip/TZ/etgmt00.pm # once (10µs+7µs) by XML::NamespaceSupport::BEGIN@110 at line 110 of XML/NamespaceSupport.pm # once (12µs+0s) by Modern::Perl::BEGIN@10 at line 10 of Modern/Perl.pm # once (11µs+0s) by C4::Auth::BEGIN@21 at line 21 of C4/Auth.pm # once (11µs+0s) by overloading::BEGIN@2 at line 2 of overloading.pm # once (10µs+0s) by Template::BEGIN@23 at line 23 of Template.pm # once (10µs+0s) by URI::BEGIN@4 at line 4 of URI.pm # once (9µs+0s) by C4::SQLHelper::BEGIN@22 at line 22 of C4/SQLHelper.pm # once (9µs+0s) by URI::Escape::BEGIN@4 at line 4 of URI/Escape.pm # once (9µs+0s) by DateTime::Infinite::BEGIN@4 at line 4 of DateTime/Infinite.pm # once (9µs+0s) by C4::SMS::BEGIN@36 at line 36 of C4/SMS.pm # once (8µs+0s) by Crypt::Eksblowfish::BEGIN@47 at line 47 of Crypt/Eksblowfish.pm # once (8µs+0s) by C4::Auth_with_cas::BEGIN@21 at line 21 of C4/Auth_with_cas.pm # once (8µs+0s) by C4::Context::BEGIN@2 at line 2 of ZOOM.pm # once (8µs+0s) by C4::ItemCirculationAlertPreference::BEGIN@21 at line 21 of C4/ItemCirculationAlertPreference.pm # once (8µs+0s) by CGI::Cookie::BEGIN@4 at line 4 of CGI/Cookie.pm # once (8µs+0s) by C4::VirtualShelves::BEGIN@21 at line 21 of C4/VirtualShelves.pm # once (8µs+0s) by C4::Members::Messaging::BEGIN@21 at line 21 of C4/Members/Messaging.pm # once (8µs+0s) by Crypt::Eksblowfish::Bcrypt::BEGIN@38 at line 38 of Crypt/Eksblowfish/Bcrypt.pm # once (8µs+0s) by Date::Manip::Lang::english::BEGIN@12 at line 12 of Date/Manip/Lang/english.pm # once (8µs+0s) by URI::QueryParam::BEGIN@4 at line 4 of URI/QueryParam.pm # once (8µs+0s) by C4::Boolean::BEGIN@25 at line 25 of C4/Boolean.pm # once (8µs+0s) by C4::Templates::BEGIN@4 at line 4 of C4/Templates.pm # once (8µs+0s) by C4::NewsChannels::BEGIN@21 at line 21 of C4/NewsChannels.pm # once (8µs+0s) by DateTime::Format::Builder::BEGIN@7 at line 7 of DateTime/Format/Builder.pm # once (8µs+0s) by C4::Dates::BEGIN@23 at line 23 of C4/Dates.pm # once (8µs+0s) by Library::CallNumber::LC::BEGIN@247 at line 247 of Library/CallNumber/LC.pm # once (8µs+0s) by String::Random::BEGIN@18 at line 18 of String/Random.pm # once (8µs+0s) by DateTime::BEGIN@8 at line 8 of DateTime.pm # once (8µs+0s) by Koha::DateUtils::BEGIN@20 at line 20 of Koha/DateUtils.pm # once (8µs+0s) by C4::Members::Attributes::BEGIN@21 at line 21 of C4/Members/Attributes.pm # once (8µs+0s) by DateTime::Infinite::Future::BEGIN@39 at line 39 of DateTime/Infinite.pm # once (8µs+0s) by C4::Output::JSONStream::BEGIN@40 at line 40 of C4/Output/JSONStream.pm # once (8µs+0s) by Template::Service::BEGIN@24 at line 24 of Template/Service.pm # once (7µs+0s) by C4::Debug::BEGIN@21 at line 21 of C4/Debug.pm # once (7µs+0s) by Authen::CAS::Client::BEGIN@6 at line 6 of Authen/CAS/Client.pm # once (7µs+0s) by C4::Linker::BEGIN@46 at line 46 of C4/Linker.pm # once (7µs+0s) by DateTime::Format::Builder::Parser::Dispatch::BEGIN@6 at line 6 of DateTime/Format/Builder/Parser/Dispatch.pm # once (7µs+0s) by Date::Manip::Recur::BEGIN@18 at line 18 of Date/Manip/Recur.pm # once (7µs+0s) by Date::Manip::BEGIN@9 at line 9 of Date/Manip.pm # once (7µs+0s) by C4::Log::BEGIN@25 at line 25 of C4/Log.pm # once (7µs+0s) by Date::Manip::Delta::BEGIN@18 at line 18 of Date/Manip/Delta.pm # once (7µs+0s) by DateTime::Format::Builder::Parser::BEGIN@6 at line 6 of DateTime/Format/Builder/Parser.pm # once (7µs+0s) by Carp::BEGIN@5 at line 5 of Carp.pm # once (7µs+0s) by Net::Z3950::ZOOM::BEGIN@5 at line 5 of Net/Z3950/ZOOM.pm # once (7µs+0s) by MARC::Charset::Table::BEGIN@35 at line 35 of MARC/Charset/Table.pm # once (7µs+0s) by AnyDBM_File::BEGIN@2 at line 2 of AnyDBM_File.pm # once (7µs+0s) by C4::Context::BEGIN@20 at line 20 of C4/Context.pm # once (7µs+0s) by Module::Load::BEGIN@6 at line 6 of Module/Load.pm # once (7µs+0s) by Template::Base::BEGIN@23 at line 23 of Template/Base.pm # once (6µs+0s) by DBI::_firesafe::BEGIN@4 at line 4 of DBD/mysql.pm # once (6µs+0s) by Module::Metadata::BEGIN@13 at line 13 of Module/Metadata.pm # once (6µs+0s) by Crypt::Eksblowfish::Subkeyed::BEGIN@70 at line 70 of Crypt/Eksblowfish/Subkeyed.pm # once (6µs+0s) by Config::BEGIN@10 at line 10 of Config.pm # once (6µs+0s) by DateTime::Format::Builder::Parser::Quick::BEGIN@6 at line 6 of DateTime/Format/Builder/Parser/Quick.pm # once (6µs+0s) by C4::Charset::BEGIN@21 at line 21 of C4/Charset.pm # once (6µs+0s) by C4::Service::BEGIN@45 at line 45 of C4/Service.pm # once (6µs+0s) by IO::BEGIN@8 at line 8 of IO.pm # once (6µs+0s) by C4::ClassSource::BEGIN@21 at line 21 of C4/ClassSource.pm # once (6µs+0s) by C4::ClassSortRoutine::BEGIN@21 at line 21 of C4/ClassSortRoutine.pm # once (6µs+0s) by DateTime::TimeZone::Floating::BEGIN@4 at line 4 of DateTime/TimeZone/Floating.pm # once (6µs+0s) by Date::Manip::DM6::BEGIN@54 at line 54 of Date/Manip/DM6.pm # once (6µs+0s) by deprecate::BEGIN@3 at line 3 of deprecate.pm # once (6µs+0s) by POSIX::BEGIN@3 at line 3 of POSIX.pm # once (6µs+0s) by Date::Manip::Obj::BEGIN@10 at line 10 of Date/Manip/Obj.pm # once (6µs+0s) by Config::BEGIN@6 at line 6 of Config_heavy.pl # once (6µs+0s) by Text::CSV_XS::BEGIN@24 at line 24 of Text/CSV_XS.pm # once (6µs+0s) by DateTime::Infinite::Past::BEGIN@64 at line 64 of DateTime/Infinite.pm # once (6µs+0s) by DateTime::Format::Builder::Parser::Regex::BEGIN@8 at line 8 of DateTime/Format/Builder/Parser/Regex.pm # once (6µs+0s) by Template::Constants::BEGIN@23 at line 23 of Template/Constants.pm # once (5µs+0s) by C4::ClassSortRoutine::Generic::BEGIN@21 at line 21 of C4/ClassSortRoutine/Generic.pm # once (5µs+0s) by FakeLocale::BEGIN@90 at line 90 of DateTime/Infinite.pm # once (5µs+0s) by C4::ClassSortRoutine::Dewey::BEGIN@21 at line 21 of C4/ClassSortRoutine/Dewey.pm # once (5µs+0s) by MARC::Charset::Code::BEGIN@4 at line 4 of MARC/Charset/Code.pm # once (5µs+0s) by Authen::CAS::Client::BEGIN@4 at line 4 of Authen/CAS/Client/Response.pm # once (5µs+0s) by DateTime::TimeZone::BEGIN@8 at line 8 of DateTime/TimeZone.pm # once (5µs+0s) by MARC::File::XML::BEGIN@3 at line 3 of MARC/File/XML.pm # once (5µs+0s) by Date::Manip::Date::BEGIN@18 at line 18 of Date/Manip/Date.pm # once (5µs+0s) by C4::Message::BEGIN@23 at line 23 of C4/Message.pm # once (5µs+0s) by GDBM_File::BEGIN@45 at line 45 of GDBM_File.pm # once (5µs+0s) by namespace::clean::BEGIN@3 at line 3 of namespace/clean.pm # once (5µs+0s) by File::Basename::BEGIN@14 at line 14 of File/Basename.pm # once (5µs+0s) by Template::Config::BEGIN@22 at line 22 of Template/Config.pm # once (5µs+0s) by XML::LibXML::AttributeHash::BEGIN@4 at line 4 of XML/LibXML/AttributeHash.pm # once (5µs+0s) by Template::Exception::BEGIN@23 at line 23 of Template/Exception.pm # once (5µs+0s) by charnames::BEGIN@3 at line 3 of charnames.pm # once (5µs+0s) by C4::Letters::BEGIN@21 at line 21 of C4/Letters.pm # once (5µs+0s) by YAML::BEGIN@1.8 at line 1 of YAML/Node.pm # once (5µs+0s) by Class::Singleton::BEGIN@20 at line 20 of Class/Singleton.pm # once (5µs+0s) by Template::Document::BEGIN@25 at line 25 of Template/Document.pm # once (5µs+0s) by MARC::Charset::Constants::BEGIN@19 at line 19 of MARC/Charset/Constants.pm # once (5µs+0s) by File::Find::BEGIN@4 at line 4 of File/Find.pm # once (5µs+0s) by Date::Manip::TZ_Base::BEGIN@10 at line 10 of Date/Manip/TZ_Base.pm # once (5µs+0s) by Template::Provider::BEGIN@42 at line 42 of Template/Provider.pm # once (5µs+0s) by MARC::Charset::BEGIN@4 at line 4 of MARC/Charset.pm # once (5µs+0s) by C4::ClassSortRoutine::LCC::BEGIN@22 at line 22 of C4/ClassSortRoutine/LCC.pm # once (5µs+0s) by Algorithm::CheckDigits::BEGIN@6 at line 6 of Algorithm/CheckDigits.pm # once (5µs+0s) by Library::CallNumber::LC::BEGIN@3 at line 3 of Library/CallNumber/LC.pm # once (4µs+0s) by DateTime::Duration::BEGIN@4 at line 4 of DateTime/Duration.pm # once (4µs+0s) by DateTime::TimeZone::UTC::BEGIN@4 at line 4 of DateTime/TimeZone/UTC.pm # once (4µs+0s) by Date::Manip::TZ::BEGIN@19 at line 19 of Date/Manip/TZ.pm # once (4µs+0s) by Try::Tiny::BEGIN@10 at line 10 of Try/Tiny.pm # once (4µs+0s) by DateTime::Format::Builder::Parser::Strptime::BEGIN@8 at line 8 of DateTime/Format/Builder/Parser/Strptime.pm # once (4µs+0s) by DateTime::Format::Builder::Parser::generic::BEGIN@6 at line 6 of DateTime/Format/Builder/Parser/generic.pm # once (4µs+0s) by MARC::File::USMARC::BEGIN@10 at line 10 of MARC/File/USMARC.pm # once (4µs+0s) by C4::Biblio::BEGIN@23 at line 23 of C4/Biblio.pm # once (4µs+0s) by Params::Validate::XS::BEGIN@4 at line 4 of Params/Validate/XS.pm # once (4µs+0s) by C4::ItemType::BEGIN@22 at line 22 of C4/ItemType.pm # once (4µs+0s) by Data::OptList::BEGIN@2 at line 2 of Sub/Install.pm # once (4µs+0s) by C4::Category::BEGIN@22 at line 22 of C4/Category.pm # once (4µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@4 at line 4 of DateTime/TimeZone/OffsetOnly.pm # once (4µs+0s) by Module::Implementation::BEGIN@6 at line 6 of Module/Implementation.pm # once (4µs+0s) by DateTime::TimeZone::Local::BEGIN@4 at line 4 of DateTime/TimeZone/Local.pm # once (4µs+0s) by B::Hooks::EndOfScope::BEGIN@13 at line 13 of B/Hooks/EndOfScope.pm # once (4µs+0s) by Koha::Calendar::BEGIN@3 at line 3 of Koha/Calendar.pm # once (4µs+0s) by DateTime::Locale::Catalog::BEGIN@18 at line 18 of DateTime/Locale/Catalog.pm # once (4µs+0s) by Params::Validate::BEGIN@6 at line 6 of Params/Validate.pm # once (4µs+0s) by XML::LibXML::NodeList::BEGIN@13 at line 13 of XML/LibXML/NodeList.pm # once (4µs+0s) by Class::Load::XS::BEGIN@9 at line 9 of Class/Load/XS.pm # once (4µs+0s) by DateTime::TimeZone::Local::BEGIN@2 at line 2 of Class/Load.pm # once (4µs+0s) by YAML::Node::BEGIN@1.9 at line 1 of YAML/Tag.pm # once (4µs+0s) by XML::LibXML::Error::BEGIN@12 at line 12 of XML/LibXML/Error.pm # once (4µs+0s) by DateTime::Locale::en_US::BEGIN@22 at line 22 of DateTime/Locale/en_US.pm # once (4µs+0s) by C4::Stats::BEGIN@22 at line 22 of C4/Stats.pm # once (4µs+0s) by DateTime::Locale::BEGIN@4 at line 4 of DateTime/Locale.pm # once (4µs+0s) by XML::LibXML::BEGIN@14 at line 14 of XML/LibXML.pm # once (4µs+0s) by Sub::Name::BEGIN@56 at line 56 of Sub/Name.pm # once (4µs+0s) by B::Hooks::EndOfScope::XS::BEGIN@11 at line 11 of B/Hooks/EndOfScope/XS.pm # once (4µs+0s) by MARC::Record::BEGIN@10 at line 10 of MARC/Record.pm # once (4µs+0s) by Sub::Exporter::Progressive::BEGIN@4 at line 4 of Sub/Exporter/Progressive.pm # once (4µs+0s) by Class::Load::BEGIN@2 at line 2 of Data/OptList.pm # once (4µs+0s) by DateTime::Locale::en::BEGIN@22 at line 22 of DateTime/Locale/en.pm # once (4µs+0s) by XML::LibXML::Literal::BEGIN@16 at line 16 of XML/LibXML/Literal.pm # once (4µs+0s) by DateTime::Locale::root::BEGIN@22 at line 22 of DateTime/Locale/root.pm # once (4µs+0s) by Date::Manip::Lang::index::BEGIN@25 at line 25 of Date/Manip/Lang/index.pm # once (4µs+0s) by Date::Manip::Zones::BEGIN@17 at line 17 of Date/Manip/Zones.pm # once (4µs+0s) by Encode::BEGIN@6 at line 6 of Encode.pm # once (4µs+0s) by Params::Validate::Constants::BEGIN@4 at line 4 of Params/Validate/Constants.pm # once (4µs+0s) by Variable::Magic::BEGIN@6 at line 6 of Variable/Magic.pm # once (4µs+0s) by MARC::File::Encode::BEGIN@20 at line 20 of MARC/File/Encode.pm # once (4µs+0s) by Date::Manip::TZ::BEGIN@731 at line 731 of Date/Manip/TZ.pm # once (4µs+0s) by Package::Stash::XS::BEGIN@9 at line 9 of Package/Stash/XS.pm # once (4µs+0s) by Unicode::Normalize::BEGIN@14 at line 14 of Unicode/Normalize.pm # once (4µs+0s) by Package::Stash::BEGIN@7 at line 7 of Package/Stash.pm # once (4µs+0s) by MARC::File::BEGIN@10 at line 10 of MARC/File.pm # once (4µs+0s) by DateTime::Helpers::BEGIN@4 at line 4 of DateTime/Helpers.pm # once (4µs+0s) by MARC::Field::BEGIN@4 at line 4 of MARC/Field.pm # once (4µs+0s) by DateTime::Locale::Base::BEGIN@4 at line 4 of DateTime/Locale/Base.pm # once (4µs+0s) by _charnames::BEGIN@8 at line 8 of _charnames.pm # once (4µs+0s) by Encode::Config::BEGIN@8 at line 8 of Encode/Config.pm # once (4µs+0s) by utf8::BEGIN@3 at line 3 of utf8_heavy.pl # once (4µs+0s) by mro::BEGIN@11 at line 11 of mro.pm # once (4µs+0s) by Date::Manip::Base::BEGIN@20 at line 20 of Date/Manip/Base.pm # once (4µs+0s) by XML::LibXML::Number::BEGIN@14 at line 14 of XML/LibXML/Number.pm # once (4µs+0s) by XML::LibXML::XPathContext::BEGIN@13 at line 13 of XML/LibXML/XPathContext.pm # once (4µs+0s) by re::BEGIN@5 at line 5 of re.pm # once (4µs+0s) by Encode::Encoding::BEGIN@5 at line 5 of Encode/Encoding.pm # once (4µs+0s) by Encode::Alias::BEGIN@3 at line 3 of Encode/Alias.pm # once (3µs+0s) by XML::LibXML::Boolean::BEGIN@15 at line 15 of XML/LibXML/Boolean.pm
{
27216524µs shift;
273
274165283µs my $mask = ${^WARNING_BITS} // ($^W ? $Bits{all} : $DEFAULT) ;
275
276165168µs if (vec($mask, $Offsets{'all'}, 1)) {
27731µs $mask |= $Bits{'all'} ;
27832µs $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
279 }
280
281 # append 'all' when implied (after a lone "FATAL" or "NONFATAL")
28216561µs push @_, 'all' if @_==1 && ( $_[0] eq 'FATAL' || $_[0] eq 'NONFATAL' );
283
284 # Empty @_ is equivalent to @_ = 'all' ;
285165916µs17µs ${^WARNING_BITS} = @_ ? _bits($mask, @_) : $mask | $Bits{all} ;
# spent 7µs making 1 call to warnings::_bits
286}
287
288sub unimport
289
# spent 381µs within warnings::unimport which was called 27 times, avg 14µs/call: # once (20µs+0s) by C4::Auth::BEGIN@1637 at line 1637 of C4/Auth.pm # once (19µs+0s) by Carp::BEGIN@6 at line 24 of Carp.pm # once (17µs+0s) by Library::CallNumber::LC::BEGIN@241 at line 241 of Library/CallNumber/LC.pm # once (17µs+0s) by Module::Metadata::BEGIN@728 at line 728 of Module/Metadata.pm # once (16µs+0s) by CGI::Cookie::BEGIN@138 at line 138 of CGI/Cookie.pm # once (16µs+0s) by Module::Implementation::BEGIN@129 at line 129 of Module/Implementation.pm # once (16µs+0s) by YAML::Mo::BEGIN@5 at line 5 of YAML/Mo.pm # once (15µs+0s) by YAML::BEGIN@37 at line 37 of YAML.pm # once (15µs+0s) by _charnames::BEGIN@165 at line 165 of _charnames.pm # once (15µs+0s) by Template::Base::BEGIN@45 at line 45 of Template/Base.pm # once (15µs+0s) by C4::Context::BEGIN@1220 at line 1220 of C4/Context.pm # once (15µs+0s) by autouse::BEGIN@56 at line 56 of autouse.pm # once (14µs+0s) by namespace::clean::BEGIN@445 at line 445 of namespace/clean.pm # once (14µs+0s) by XML::NamespaceSupport::BEGIN@99 at line 99 of XML/NamespaceSupport.pm # once (14µs+0s) by Encode::BEGIN@240 at line 240 of Encode.pm # once (14µs+0s) by XML::LibXML::Error::BEGIN@15 at line 15 of XML/LibXML/Error.pm # once (14µs+0s) by Unicode::Normalize::BEGIN@17 at line 17 of Unicode/Normalize.pm # once (13µs+0s) by Encode::Alias::BEGIN@4 at line 4 of Encode/Alias.pm # once (13µs+0s) by Date::Manip::TZ::BEGIN@721 at line 721 of Date/Manip/TZ.pm # once (13µs+0s) by Library::CallNumber::LC::BEGIN@277 at line 277 of Library/CallNumber/LC.pm # once (13µs+0s) by Carp::BEGIN@568 at line 568 of Carp.pm # once (13µs+0s) by Date::Manip::Base::BEGIN@1359 at line 1359 of Date/Manip/Base.pm # once (12µs+0s) by Math::BigInt::BEGIN@44 at line 44 of Math/BigInt.pm # once (11µs+0s) by XML::LibXML::Error::BEGIN@245 at line 245 of XML/LibXML/Error.pm # once (10µs+0s) by utf8::BEGIN@149 at line 149 of utf8_heavy.pl # once (9µs+0s) by Exporter::Heavy::BEGIN@188 at line 188 of Exporter/Heavy.pm # once (9µs+0s) by utf8::BEGIN@559 at line 559 of utf8_heavy.pl
{
290277µs shift;
291
292277µs my $catmask ;
2932769µs my $mask = ${^WARNING_BITS} // ($^W ? $Bits{all} : $DEFAULT) ;
294
2952740µs if (vec($mask, $Offsets{'all'}, 1)) {
2962015µs $mask |= $Bits{'all'} ;
2972021µs $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
298 }
299
300 # append 'all' when implied (empty import list or after a lone "FATAL")
3012730µs push @_, 'all' if !@_ || @_==1 && $_[0] eq 'FATAL';
302
3032729µs foreach my $word ( @_ ) {
3043099µs if ($word eq 'FATAL') {
305 next;
306 }
307 elsif ($catmask = $Bits{$word}) {
308 $mask &= ~($catmask | $DeadBits{$word} | $All);
309 }
310 else
311 { Croaker("Unknown warnings category '$word'")}
312 }
313
31427147µs ${^WARNING_BITS} = $mask ;
315}
316
31724µsmy %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE Regexp)} = ();
318
319sub MESSAGE () { 4 };
320sub FATAL () { 2 };
321sub NORMAL () { 1 };
322
323sub __chk
324
# spent 206µs (52+154) within warnings::__chk which was called 2 times, avg 103µs/call: # once (26µs+84µs) by warnings::enabled at line 435 # once (27µs+70µs) by warnings::warnif at line 450
{
3252400ns my $category ;
326 my $offset ;
3272700ns my $isobj = 0 ;
3282800ns my $wanted = shift;
32921µs my $has_message = $wanted & MESSAGE;
330
3312900ns unless (@_ == 1 || @_ == ($has_message ? 2 : 0)) {
332 my $sub = (caller 1)[3];
333 my $syntax = $has_message ? "[category,] 'message'" : '[category]';
334 Croaker("Usage: $sub($syntax)");
335 }
336
33721µs my $message = pop if $has_message;
338
33921µs if (@_) {
340 # check the category supplied.
3411400ns $category = shift ;
3421400ns if (my $type = ref $category) {
343 Croaker("not an object")
344 if exists $builtin_type{$type};
345 $category = $type;
346 $isobj = 1 ;
347 }
3481700ns $offset = $Offsets{$category};
3491300ns Croaker("Unknown warnings category '$category'")
350 unless defined $offset;
351 }
352 else {
35312µs $category = (caller(1))[0] ;
35411µs $offset = $Offsets{$category};
3551400ns Croaker("package '$category' not registered for warnings")
356 unless defined $offset ;
357 }
358
35921µs my $i;
360
36121µs if ($isobj) {
362 my $pkg;
363 $i = 2;
364 while (do { { package DB; $pkg = (caller($i++))[0] } } ) {
365 last unless @DB::args && $DB::args[0] =~ /^$category=/ ;
366 }
367 $i -= 2 ;
368 }
369 else {
37024µs28µs $i = _error_loc(); # see where Carp will allocate the error
# spent 8µs making 2 calls to warnings::_error_loc, avg 4µs/call
371 }
372
373 # Default to 0 if caller returns nothing. Default to $DEFAULT if it
374 # explicitly returns undef.
37527µs my(@callers_bitmask) = (caller($i))[9] ;
37622µs my $callers_bitmask =
377 @callers_bitmask ? $callers_bitmask[0] // $DEFAULT : 0 ;
378
3792600ns my @results;
38022µs foreach my $type (FATAL, NORMAL) {
38141µs next unless $wanted & $type;
382
38334µs push @results, (vec($callers_bitmask, $offset + $type - 1, 1) ||
384 vec($callers_bitmask, $Offsets{'all'} + $type - 1, 1));
385 }
386
387 # &enabled and &fatal_enabled
38824µs return $results[0] unless $has_message;
389
390 # &warnif, and the category is neither enabled as warning nor as fatal
39114µs return if $wanted == (NORMAL | FATAL | MESSAGE)
392 && !($results[0] || $results[1]);
393
394 require Carp;
395 Carp::croak($message) if $results[0];
396 # will always get here for &warn. will only get here for &warnif if the
397 # category is enabled
398 Carp::carp($message);
399}
400
401sub _mkMask
402
# spent 52µs within warnings::_mkMask which was called 14 times, avg 4µs/call: # 7 times (37µs+0s) by warnings::register_categories at line 416, avg 5µs/call # 7 times (15µs+0s) by warnings::register_categories at line 422, avg 2µs/call
{
403145µs my ($bit) = @_;
404144µs my $mask = "";
405
4061423µs vec($mask, $bit, 1) = 1;
4071446µs return $mask;
408}
409
410sub register_categories
411
# spent 538µs (486+52) within warnings::register_categories which was called 7 times, avg 77µs/call: # 7 times (486µs+52µs) by warnings::register::import at line 24 of warnings/register.pm, avg 77µs/call
{
41275µs my @names = @_;
413
414724µs for my $name (@names) {
415712µs if (! defined $Bits{$name}) {
416720µs737µs $Bits{$name} = _mkMask($LAST_BIT);
# spent 37µs making 7 calls to warnings::_mkMask, avg 5µs/call
417711µs vec($Bits{'all'}, $LAST_BIT, 1) = 1;
41879µs $Offsets{$name} = $LAST_BIT ++;
419776µs foreach my $k (keys %Bits) {
420448285µs vec($Bits{$k}, $LAST_BIT, 1) = 0;
421 }
422714µs715µs $DeadBits{$name} = _mkMask($LAST_BIT);
# spent 15µs making 7 calls to warnings::_mkMask, avg 2µs/call
42379µs vec($DeadBits{'all'}, $LAST_BIT++, 1) = 1;
424 }
425 }
426}
427
428
# spent 8µs within warnings::_error_loc which was called 2 times, avg 4µs/call: # 2 times (8µs+0s) by warnings::__chk at line 370, avg 4µs/call
sub _error_loc {
42922µs require Carp;
430215µs2146µs goto &Carp::short_error_loc; # don't introduce another stack frame
# spent 146µs making 2 calls to Carp::short_error_loc, avg 73µs/call
431}
432
433sub enabled
434
# spent 114µs (5+109) within warnings::enabled which was called: # once (5µs+109µs) by _charnames::import at line 665 of _charnames.pm
{
43514µs1109µs return __chk(NORMAL, @_);
# spent 109µs making 1 call to warnings::__chk
436}
437
438sub fatal_enabled
439{
440 return __chk(FATAL, @_);
441}
442
443sub warn
444{
445 return __chk(FATAL | MESSAGE, @_);
446}
447
448sub warnif
449
# spent 102µs (5+97) within warnings::warnif which was called: # once (5µs+97µs) by overload::OVERLOAD at line 42 of overload.pm
{
45015µs197µs return __chk(NORMAL | FATAL | MESSAGE, @_);
# spent 97µs making 1 call to warnings::__chk
451}
452
453# These are not part of any public interface, so we can delete them to save
454# space.
45517µsdelete @warnings::{qw(NORMAL FATAL MESSAGE)};
456
457142µs1;
458
459# ex: set ro:
 
# spent 7µs within warnings::CORE:match which was called: # once (7µs+0s) by Modern::Perl::BEGIN@10 at line 12
sub warnings::CORE:match; # opcode
# spent 30µs within warnings::CORE:regcomp which was called: # once (30µs+0s) by Modern::Perl::BEGIN@10 at line 12
sub warnings::CORE:regcomp; # opcode