← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:45 2012

Filename/usr/lib/perl5/5.14/warnings.pm
StatementsExecuted 656 statements in 2.40ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
7111.17ms1.29mswarnings::::register_categorieswarnings::register_categories
181818398µs398µswarnings::::importwarnings::import
1421129µs129µswarnings::::_mkMaskwarnings::_mkMask
333105µs105µswarnings::::unimportwarnings::unimport
11152µs52µswarnings::::CORE:regcompwarnings::CORE:regcomp (opcode)
11117µs17µswarnings::::CORE:matchwarnings::CORE:match (opcode)
0000s0swarnings::::Croakerwarnings::Croaker
0000s0swarnings::::__chkwarnings::__chk
0000s0swarnings::::_bitswarnings::_bits
0000s0swarnings::::_error_locwarnings::_error_loc
0000s0swarnings::::bitswarnings::bits
0000s0swarnings::::enabledwarnings::enabled
0000s0swarnings::::fatal_enabledwarnings::fatal_enabled
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 is built by regen/warnings.pl.
4# Any changes made here will be lost!
5
6package warnings;
7
812µsour $VERSION = '1.12';
9
10# Verify that we're called correctly so that warnings will work.
11# see also strict.pm.
121100µs269µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 52µs making 1 call to warnings::CORE:regcomp # spent 17µ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
17=head1 NAME
18
19warnings - Perl pragma to control optional warnings
20
21=head1 SYNOPSIS
22
23 use warnings;
24 no warnings;
25
26 use warnings "all";
27 no warnings "all";
28
29 use warnings::register;
30 if (warnings::enabled()) {
31 warnings::warn("some warning");
32 }
33
34 if (warnings::enabled("void")) {
35 warnings::warn("void", "some warning");
36 }
37
38 if (warnings::enabled($object)) {
39 warnings::warn($object, "some warning");
40 }
41
42 warnings::warnif("some warning");
43 warnings::warnif("void", "some warning");
44 warnings::warnif($object, "some warning");
45
46=head1 DESCRIPTION
47
48The C<warnings> pragma is a replacement for the command line flag C<-w>,
49but the pragma is limited to the enclosing block, while the flag is global.
50See L<perllexwarn> for more information.
51
52If no import list is supplied, all possible warnings are either enabled
53or disabled.
54
55A number of functions are provided to assist module authors.
56
57=over 4
58
59=item use warnings::register
60
61Creates a new warnings category with the same name as the package where
62the call to the pragma is used.
63
64=item warnings::enabled()
65
66Use the warnings category with the same name as the current package.
67
68Return TRUE if that warnings category is enabled in the calling module.
69Otherwise returns FALSE.
70
71=item warnings::enabled($category)
72
73Return TRUE if the warnings category, C<$category>, is enabled in the
74calling module.
75Otherwise returns FALSE.
76
77=item warnings::enabled($object)
78
79Use the name of the class for the object reference, C<$object>, as the
80warnings category.
81
82Return TRUE if that warnings category is enabled in the first scope
83where the object is used.
84Otherwise returns FALSE.
85
86=item warnings::fatal_enabled()
87
88Return TRUE if the warnings category with the same name as the current
89package has been set to FATAL in the calling module.
90Otherwise returns FALSE.
91
92=item warnings::fatal_enabled($category)
93
94Return TRUE if the warnings category C<$category> has been set to FATAL in
95the calling module.
96Otherwise returns FALSE.
97
98=item warnings::fatal_enabled($object)
99
100Use the name of the class for the object reference, C<$object>, as the
101warnings category.
102
103Return TRUE if that warnings category has been set to FATAL in the first
104scope where the object is used.
105Otherwise returns FALSE.
106
107=item warnings::warn($message)
108
109Print C<$message> to STDERR.
110
111Use the warnings category with the same name as the current package.
112
113If that warnings category has been set to "FATAL" in the calling module
114then die. Otherwise return.
115
116=item warnings::warn($category, $message)
117
118Print C<$message> to STDERR.
119
120If the warnings category, C<$category>, has been set to "FATAL" in the
121calling module then die. Otherwise return.
122
123=item warnings::warn($object, $message)
124
125Print C<$message> to STDERR.
126
127Use the name of the class for the object reference, C<$object>, as the
128warnings category.
129
130If that warnings category has been set to "FATAL" in the scope where C<$object>
131is first used then die. Otherwise return.
132
133
134=item warnings::warnif($message)
135
136Equivalent to:
137
138 if (warnings::enabled())
139 { warnings::warn($message) }
140
141=item warnings::warnif($category, $message)
142
143Equivalent to:
144
145 if (warnings::enabled($category))
146 { warnings::warn($category, $message) }
147
148=item warnings::warnif($object, $message)
149
150Equivalent to:
151
152 if (warnings::enabled($object))
153 { warnings::warn($object, $message) }
154
155=item warnings::register_categories(@names)
156
157This registers warning categories for the given names and is primarily for
158use by the warnings::register pragma, for which see L<perllexwarn>.
159
160=back
161
162See L<perlmodlib/Pragmatic Modules> and L<perllexwarn>.
163
164=cut
165
166142µsour %Offsets = (
167
168 # Warnings Categories added in Perl 5.008
169
170 'all' => 0,
171 'closure' => 2,
172 'deprecated' => 4,
173 'exiting' => 6,
174 'glob' => 8,
175 'io' => 10,
176 'closed' => 12,
177 'exec' => 14,
178 'layer' => 16,
179 'newline' => 18,
180 'pipe' => 20,
181 'unopened' => 22,
182 'misc' => 24,
183 'numeric' => 26,
184 'once' => 28,
185 'overflow' => 30,
186 'pack' => 32,
187 'portable' => 34,
188 'recursion' => 36,
189 'redefine' => 38,
190 'regexp' => 40,
191 'severe' => 42,
192 'debugging' => 44,
193 'inplace' => 46,
194 'internal' => 48,
195 'malloc' => 50,
196 'signal' => 52,
197 'substr' => 54,
198 'syntax' => 56,
199 'ambiguous' => 58,
200 'bareword' => 60,
201 'digit' => 62,
202 'parenthesis' => 64,
203 'precedence' => 66,
204 'printf' => 68,
205 'prototype' => 70,
206 'qw' => 72,
207 'reserved' => 74,
208 'semicolon' => 76,
209 'taint' => 78,
210 'threads' => 80,
211 'uninitialized' => 82,
212 'unpack' => 84,
213 'untie' => 86,
214 'utf8' => 88,
215 'void' => 90,
216
217 # Warnings Categories added in Perl 5.011
218
219 'imprecision' => 92,
220 'illegalproto' => 94,
221
222 # Warnings Categories added in Perl 5.013
223
224 'non_unicode' => 96,
225 'nonchar' => 98,
226 'surrogate' => 100,
227 );
228
229134µsour %Bits = (
230 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15", # [0..50]
231 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [29]
232 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [30]
233 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
234 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
235 'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [22]
236 'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
237 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [31]
238 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
239 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
240 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
241 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [47]
242 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [46]
243 'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [23]
244 'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [24]
245 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5..11]
246 'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
247 'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00", # [25]
248 'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
249 'newline' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
250 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [48]
251 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [49]
252 'numeric' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
253 'once' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
254 'overflow' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
255 'pack' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
256 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", # [32]
257 'pipe' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
258 'portable' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
259 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [33]
260 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [34]
261 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [35]
262 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [36]
263 'recursion' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
264 'redefine' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
265 'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [20]
266 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [37]
267 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [38]
268 'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00\x00", # [21..25]
269 'signal' => "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [26]
270 'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [27]
271 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10", # [50]
272 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x40\x00", # [28..38,47]
273 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [39]
274 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [40]
275 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [41]
276 'unopened' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
277 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [42]
278 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [43]
279 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x15", # [44,48..50]
280 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [45]
281 );
282
283135µsour %DeadBits = (
284 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x2a", # [0..50]
285 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [29]
286 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [30]
287 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
288 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
289 'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [22]
290 'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
291 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [31]
292 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
293 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
294 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
295 'illegalproto' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [47]
296 'imprecision' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [46]
297 'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [23]
298 'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [24]
299 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5..11]
300 'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
301 'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00", # [25]
302 'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
303 'newline' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
304 'non_unicode' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [48]
305 'nonchar' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [49]
306 'numeric' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
307 'once' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
308 'overflow' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
309 'pack' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [16]
310 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00", # [32]
311 'pipe' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
312 'portable' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [17]
313 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [33]
314 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [34]
315 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [35]
316 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [36]
317 'recursion' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [18]
318 'redefine' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [19]
319 'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [20]
320 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [37]
321 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [38]
322 'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00\x00", # [21..25]
323 'signal' => "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [26]
324 'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [27]
325 'surrogate' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20", # [50]
326 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x80\x00", # [28..38,47]
327 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [39]
328 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [40]
329 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [41]
330 'unopened' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
331 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [42]
332 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [43]
333 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x2a", # [44,48..50]
334 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [45]
335 );
336
33711µs$NONE = "\0\0\0\0\0\0\0\0\0\0\0\0\0";
3381500ns$LAST_BIT = 102 ;
3391600ns$BYTES = 13 ;
340
341219µs$All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
342
343sub Croaker
344{
345 require Carp; # this initializes %CarpInternal
346 local $Carp::CarpInternal{'warnings'};
347 delete $Carp::CarpInternal{'warnings'};
348 Carp::croak(@_);
349}
350
351sub _bits {
352 my $mask = shift ;
353 my $catmask ;
354 my $fatal = 0 ;
355 my $no_fatal = 0 ;
356
357 foreach my $word ( @_ ) {
358 if ($word eq 'FATAL') {
359 $fatal = 1;
360 $no_fatal = 0;
361 }
362 elsif ($word eq 'NONFATAL') {
363 $fatal = 0;
364 $no_fatal = 1;
365 }
366 elsif ($catmask = $Bits{$word}) {
367 $mask |= $catmask ;
368 $mask |= $DeadBits{$word} if $fatal ;
369 $mask &= ~($DeadBits{$word}|$All) if $no_fatal ;
370 }
371 else
372 { Croaker("Unknown warnings category '$word'")}
373 }
374
375 return $mask ;
376}
377
378sub bits
379{
380 # called from B::Deparse.pm
381 push @_, 'all' unless @_ ;
382 return _bits(undef, @_) ;
383}
384
385sub import
386
# spent 398µs within warnings::import which was called 18 times, avg 22µs/call: # once (44µs+0s) by Config::BEGIN@10 at line 10 of Config.pm # once (27µs+0s) by main::BEGIN@29 at line 29 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/make_installer.pl # once (26µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (26µs+0s) by installer::logger::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/logger.pm # once (23µs+0s) by File::stat::BEGIN@5 at line 5 of File/stat.pm # once (22µs+0s) by installer::copyproject::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/copyproject.pm # once (21µs+0s) by installer::helppack::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/helppack.pm # once (21µs+0s) by Compress::Raw::Zlib::BEGIN@12 at line 12 of Compress/Raw/Zlib.pm # once (21µs+0s) by IO::BEGIN@8 at line 8 of IO.pm # once (20µs+0s) by File::Copy::BEGIN@12 at line 12 of File/Copy.pm # once (20µs+0s) by installer::strip::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/strip.pm # once (20µs+0s) by File::Basename::BEGIN@52 at line 52 of File/Basename.pm # once (19µs+0s) by File::Find::BEGIN@4 at line 4 of File/Find.pm # once (19µs+0s) by installer::converter::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/converter.pm # once (18µs+0s) by POSIX::BEGIN@3 at line 3 of POSIX.pm # once (18µs+0s) by installer::exiter::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/exiter.pm # once (18µs+0s) by installer::download::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/download.pm # once (14µs+0s) by installer::files::BEGIN@31 at line 31 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/files.pm
{
387189µs shift;
388
3891851µs my $mask = ${^WARNING_BITS} ;
390
3911878µs if (vec($mask, $Offsets{'all'}, 1)) {
3921860µs $mask |= $Bits{'all'} ;
3931846µs $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
394 }
395
396 # Empty @_ is equivalent to @_ = 'all' ;
39718239µs ${^WARNING_BITS} = @_ ? _bits($mask, @_) : $mask | $Bits{all} ;
398}
399
400sub unimport
401
# spent 105µs within warnings::unimport which was called 3 times, avg 35µs/call: # once (44µs+0s) by Exporter::Heavy::BEGIN@197 at line 197 of Exporter/Heavy.pm # once (36µs+0s) by Carp::BEGIN@342 at line 342 of Carp.pm # once (25µs+0s) by POSIX::BEGIN@39 at line 39 of POSIX.pm
{
40232µs shift;
403
40432µs my $catmask ;
405313µs my $mask = ${^WARNING_BITS} ;
406
407314µs if (vec($mask, $Offsets{'all'}, 1)) {
40838µs $mask |= $Bits{'all'} ;
40938µs $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
410 }
411
41233µs push @_, 'all' unless @_;
413
41439µs foreach my $word ( @_ ) {
415327µs if ($word eq 'FATAL') {
416 next;
417 }
418 elsif ($catmask = $Bits{$word}) {
419 $mask &= ~($catmask | $DeadBits{$word} | $All);
420 }
421 else
422 { Croaker("Unknown warnings category '$word'")}
423 }
424
425341µs ${^WARNING_BITS} = $mask ;
426}
427
42827µsmy %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE Regexp)} = ();
429
430sub MESSAGE () { 4 };
431sub FATAL () { 2 };
432sub NORMAL () { 1 };
433
434sub __chk
435{
436 my $category ;
437 my $offset ;
438 my $isobj = 0 ;
439 my $wanted = shift;
440 my $has_message = $wanted & MESSAGE;
441
442 unless (@_ == 1 || @_ == ($has_message ? 2 : 0)) {
443 my $sub = (caller 1)[3];
444 my $syntax = $has_message ? "[category,] 'message'" : '[category]';
445 Croaker("Usage: $sub($syntax)");
446 }
447
448 my $message = pop if $has_message;
449
450 if (@_) {
451 # check the category supplied.
452 $category = shift ;
453 if (my $type = ref $category) {
454 Croaker("not an object")
455 if exists $builtin_type{$type};
456 $category = $type;
457 $isobj = 1 ;
458 }
459 $offset = $Offsets{$category};
460 Croaker("Unknown warnings category '$category'")
461 unless defined $offset;
462 }
463 else {
464 $category = (caller(1))[0] ;
465 $offset = $Offsets{$category};
466 Croaker("package '$category' not registered for warnings")
467 unless defined $offset ;
468 }
469
470 my $i;
471
472 if ($isobj) {
473 my $pkg;
474 $i = 2;
475 while (do { { package DB; $pkg = (caller($i++))[0] } } ) {
476 last unless @DB::args && $DB::args[0] =~ /^$category=/ ;
477 }
478 $i -= 2 ;
479 }
480 else {
481 $i = _error_loc(); # see where Carp will allocate the error
482 }
483
484 # Defaulting this to 0 reduces complexity in code paths below.
485 my $callers_bitmask = (caller($i))[9] || 0 ;
486
487 my @results;
488 foreach my $type (FATAL, NORMAL) {
489 next unless $wanted & $type;
490
491 push @results, (vec($callers_bitmask, $offset + $type - 1, 1) ||
492 vec($callers_bitmask, $Offsets{'all'} + $type - 1, 1));
493 }
494
495 # &enabled and &fatal_enabled
496 return $results[0] unless $has_message;
497
498 # &warnif, and the category is neither enabled as warning nor as fatal
499 return if $wanted == (NORMAL | FATAL | MESSAGE)
500 && !($results[0] || $results[1]);
501
502 require Carp;
503 Carp::croak($message) if $results[0];
504 # will always get here for &warn. will only get here for &warnif if the
505 # category is enabled
506 Carp::carp($message);
507}
508
509sub _mkMask
510
# spent 129µs within warnings::_mkMask which was called 14 times, avg 9µs/call: # 7 times (87µs+0s) by warnings::register_categories at line 524, avg 12µs/call # 7 times (41µs+0s) by warnings::register_categories at line 530, avg 6µs/call
{
5111415µs my ($bit) = @_;
5121411µs my $mask = "";
513
5141442µs vec($mask, $bit, 1) = 1;
51514105µs return $mask;
516}
517
518sub register_categories
519
# spent 1.29ms (1.17+129µs) within warnings::register_categories which was called 7 times, avg 185µs/call: # 7 times (1.17ms+129µs) by warnings::register::import at line 43 of warnings/register.pm, avg 185µs/call
{
520714µs my @names = @_;
521
522744µs for my $name (@names) {
523731µs if (! defined $Bits{$name}) {
524738µs787µs $Bits{$name} = _mkMask($LAST_BIT);
# spent 87µs making 7 calls to warnings::_mkMask, avg 12µs/call
525720µs vec($Bits{'all'}, $LAST_BIT, 1) = 1;
526711µs $Offsets{$name} = $LAST_BIT ++;
5277150µs foreach my $k (keys %Bits) {
528385776µs vec($Bits{$k}, $LAST_BIT, 1) = 0;
529 }
530725µs741µs $DeadBits{$name} = _mkMask($LAST_BIT);
# spent 41µs making 7 calls to warnings::_mkMask, avg 6µs/call
531715µs vec($DeadBits{'all'}, $LAST_BIT++, 1) = 1;
532 }
533 }
534}
535
536sub _error_loc {
537 require Carp;
538 goto &Carp::short_error_loc; # don't introduce another stack frame
539}
540
541sub enabled
542{
543 return __chk(NORMAL, @_);
544}
545
546sub fatal_enabled
547{
548 return __chk(FATAL, @_);
549}
550
551sub warn
552{
553 return __chk(FATAL | MESSAGE, @_);
554}
555
556sub warnif
557{
558 return __chk(NORMAL | FATAL | MESSAGE, @_);
559}
560
561# These are not part of any public interface, so we can delete them to save
562# space.
563123µsdelete $warnings::{$_} foreach qw(NORMAL FATAL MESSAGE);
564
5651232µs1;
566
567# ex: set ro:
 
# spent 17µs within warnings::CORE:match which was called: # once (17µs+0s) by main::BEGIN@29 at line 12
sub warnings::CORE:match; # opcode
# spent 52µs within warnings::CORE:regcomp which was called: # once (52µs+0s) by main::BEGIN@29 at line 12
sub warnings::CORE:regcomp; # opcode