← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 22:00:36 2010
Reported on Wed Nov 17 22:10:16 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/warnings.pm
StatementsExecuted 4529 statements in 27.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
31617317122.4ms22.4mswarnings::::importwarnings::import
151591.01ms1.01mswarnings::::unimportwarnings::unimport
11154µs54µswarnings::::CORE:regcompwarnings::CORE:regcomp (opcode)
11119µs19µswarnings::::CORE:matchwarnings::CORE:match (opcode)
0000s0swarnings::::Croakerwarnings::Croaker
0000s0swarnings::::__chkwarnings::__chk
0000s0swarnings::::_error_locwarnings::_error_loc
0000s0swarnings::::bitswarnings::bits
0000s0swarnings::::enabledwarnings::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 was created by warnings.pl
4# Any changes made here will be lost.
5#
6
7package warnings;
8
914µsour $VERSION = '1.06';
10
11# Verify that we're called correctly so that warnings will work.
12# see also strict.pm.
131139µs273µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 54µs making 1 call to warnings::CORE:regcomp # spent 19µ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
18=head1 NAME
19
- -
141156µsour %Offsets = (
142
143 # Warnings Categories added in Perl 5.008
144
145 'all' => 0,
146 'closure' => 2,
147 'deprecated' => 4,
148 'exiting' => 6,
149 'glob' => 8,
150 'io' => 10,
151 'closed' => 12,
152 'exec' => 14,
153 'layer' => 16,
154 'newline' => 18,
155 'pipe' => 20,
156 'unopened' => 22,
157 'misc' => 24,
158 'numeric' => 26,
159 'once' => 28,
160 'overflow' => 30,
161 'pack' => 32,
162 'portable' => 34,
163 'recursion' => 36,
164 'redefine' => 38,
165 'regexp' => 40,
166 'severe' => 42,
167 'debugging' => 44,
168 'inplace' => 46,
169 'internal' => 48,
170 'malloc' => 50,
171 'signal' => 52,
172 'substr' => 54,
173 'syntax' => 56,
174 'ambiguous' => 58,
175 'bareword' => 60,
176 'digit' => 62,
177 'parenthesis' => 64,
178 'precedence' => 66,
179 'printf' => 68,
180 'prototype' => 70,
181 'qw' => 72,
182 'reserved' => 74,
183 'semicolon' => 76,
184 'taint' => 78,
185 'threads' => 80,
186 'uninitialized' => 82,
187 'unpack' => 84,
188 'untie' => 86,
189 'utf8' => 88,
190 'void' => 90,
191 );
192
193176µsour %Bits = (
194 'all' => "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x05", # [0..45]
195 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00", # [29]
196 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00", # [30]
197 'closed' => "\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
198 'closure' => "\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
199 'debugging' => "\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00", # [22]
200 'deprecated' => "\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
201 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00", # [31]
202 'exec' => "\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
203 'exiting' => "\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
204 'glob' => "\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
205 'inplace' => "\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00", # [23]
206 'internal' => "\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00", # [24]
207 'io' => "\x00\x54\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5..11]
208 'layer' => "\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
209 'malloc' => "\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00", # [25]
210 'misc' => "\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
211 'newline' => "\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
212 'numeric' => "\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
213 'once' => "\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
214 'overflow' => "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
215 'pack' => "\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00", # [16]
216 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00", # [32]
217 'pipe' => "\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
218 'portable' => "\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00", # [17]
219 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00", # [33]
220 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00", # [34]
221 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00", # [35]
222 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00", # [36]
223 'recursion' => "\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00", # [18]
224 'redefine' => "\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00", # [19]
225 'regexp' => "\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00", # [20]
226 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00", # [37]
227 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00", # [38]
228 'severe' => "\x00\x00\x00\x00\x00\x54\x05\x00\x00\x00\x00\x00", # [21..25]
229 'signal' => "\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00", # [26]
230 'substr' => "\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00", # [27]
231 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\x55\x55\x15\x00\x00", # [28..38]
232 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00", # [39]
233 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00", # [40]
234 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00", # [41]
235 'unopened' => "\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
236 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00", # [42]
237 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00", # [43]
238 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01", # [44]
239 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04", # [45]
240 );
241
242156µsour %DeadBits = (
243 'all' => "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\x0a", # [0..45]
244 'ambiguous' => "\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00", # [29]
245 'bareword' => "\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00", # [30]
246 'closed' => "\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [6]
247 'closure' => "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [1]
248 'debugging' => "\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00", # [22]
249 'deprecated' => "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [2]
250 'digit' => "\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00", # [31]
251 'exec' => "\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [7]
252 'exiting' => "\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [3]
253 'glob' => "\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [4]
254 'inplace' => "\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00", # [23]
255 'internal' => "\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00", # [24]
256 'io' => "\x00\xa8\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [5..11]
257 'layer' => "\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [8]
258 'malloc' => "\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00", # [25]
259 'misc' => "\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00", # [12]
260 'newline' => "\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [9]
261 'numeric' => "\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00", # [13]
262 'once' => "\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00", # [14]
263 'overflow' => "\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00", # [15]
264 'pack' => "\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00", # [16]
265 'parenthesis' => "\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00", # [32]
266 'pipe' => "\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [10]
267 'portable' => "\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00", # [17]
268 'precedence' => "\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00", # [33]
269 'printf' => "\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00", # [34]
270 'prototype' => "\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00", # [35]
271 'qw' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00", # [36]
272 'recursion' => "\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00", # [18]
273 'redefine' => "\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00", # [19]
274 'regexp' => "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00", # [20]
275 'reserved' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00", # [37]
276 'semicolon' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00", # [38]
277 'severe' => "\x00\x00\x00\x00\x00\xa8\x0a\x00\x00\x00\x00\x00", # [21..25]
278 'signal' => "\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00", # [26]
279 'substr' => "\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00", # [27]
280 'syntax' => "\x00\x00\x00\x00\x00\x00\x00\xaa\xaa\x2a\x00\x00", # [28..38]
281 'taint' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00", # [39]
282 'threads' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00", # [40]
283 'uninitialized' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00", # [41]
284 'unopened' => "\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00", # [11]
285 'unpack' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00", # [42]
286 'untie' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00", # [43]
287 'utf8' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02", # [44]
288 'void' => "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08", # [45]
289 );
290
29112µs$NONE = "\0\0\0\0\0\0\0\0\0\0\0\0";
29212µs$LAST_BIT = 92 ;
29312µs$BYTES = 12 ;
294
295230µs$All = "" ; vec($All, $Offsets{'all'}, 2) = 3 ;
296
297sub Croaker
298{
299 require Carp::Heavy; # this initializes %CarpInternal
300 local $Carp::CarpInternal{'warnings'};
301 delete $Carp::CarpInternal{'warnings'};
302 Carp::croak(@_);
303}
304
305sub bits
306{
307 # called from B::Deparse.pm
308
309 push @_, 'all' unless @_;
310
311 my $mask;
312 my $catmask ;
313 my $fatal = 0 ;
314 my $no_fatal = 0 ;
315
316 foreach my $word ( @_ ) {
317 if ($word eq 'FATAL') {
318 $fatal = 1;
319 $no_fatal = 0;
320 }
321 elsif ($word eq 'NONFATAL') {
322 $fatal = 0;
323 $no_fatal = 1;
324 }
325 elsif ($catmask = $Bits{$word}) {
326 $mask |= $catmask ;
327 $mask |= $DeadBits{$word} if $fatal ;
328 $mask &= ~($DeadBits{$word}|$All) if $no_fatal ;
329 }
330 else
331 { Croaker("Unknown warnings category '$word'")}
332 }
333
334 return $mask ;
335}
336
337sub import
338
# spent 22.4ms within warnings::import which was called 316 times, avg 71µs/call: # 137 times (9.66ms+0s) by Moose::Exporter::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Exporter.pm:456] at line 414 of Moose/Exporter.pm, avg 71µs/call # 7 times (510µs+0s) by Moose::Exporter::import at line 648 of Moose/Exporter.pm, avg 73µs/call # 2 times (136µs+0s) by MooseX::Types::import at line 336 of MooseX/Types.pm, avg 68µs/call # once (141µs+0s) by Markdent::Event::StartDocument::BEGIN@7 at line 7 of Markdent/Event/StartDocument.pm # once (120µs+0s) by Markdent::Event::EndHeader::BEGIN@7 at line 7 of Markdent/Event/EndHeader.pm # once (104µs+0s) by Markdent::Event::StartUnorderedList::BEGIN@7 at line 7 of Markdent/Event/StartUnorderedList.pm # once (103µs+0s) by Markdent::Event::HTMLEntity::BEGIN@7 at line 7 of Markdent/Event/HTMLEntity.pm # once (102µs+0s) by Markdent::Event::HTMLTag::BEGIN@7 at line 7 of Markdent/Event/HTMLTag.pm # once (101µs+0s) by Moose::Meta::Mixin::AttributeCore::BEGIN@4 at line 4 of Moose/Meta/Mixin/AttributeCore.pm # once (98µs+0s) by Markdent::Event::StartBlockquote::BEGIN@7 at line 7 of Markdent/Event/StartBlockquote.pm # once (96µs+0s) by Markdent::Regexes::BEGIN@7 at line 7 of Markdent/Regexes.pm # once (95µs+0s) by Moose::Meta::Method::Accessor::BEGIN@5 at line 5 of Moose/Meta/Method/Accessor.pm # once (93µs+0s) by Markdent::Event::StartLink::BEGIN@7 at line 7 of Markdent/Event/StartLink.pm # once (89µs+0s) by Params::Validate::BEGIN@4 at line 4 of Params/ValidateXS.pm # once (87µs+0s) by MRO::Compat::BEGIN@3 at line 3 of MRO/Compat.pm # once (85µs+0s) by Moose::Meta::TypeCoercion::BEGIN@5 at line 5 of Moose/Meta/TypeCoercion.pm # once (83µs+0s) by Markdent::Event::EndLink::BEGIN@7 at line 7 of Markdent/Event/EndLink.pm # once (83µs+0s) by MooseX::SemiAffordanceAccessor::BEGIN@7 at line 7 of MooseX/SemiAffordanceAccessor.pm # once (80µs+0s) by Moose::Meta::Method::Accessor::Native::String::length::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/String/length.pm # once (78µs+0s) by Class::MOP::Method::Generated::BEGIN@5 at line 5 of Class/MOP/Method/Generated.pm # once (78µs+0s) by Markdent::Role::SpanParser::BEGIN@7 at line 7 of Markdent/Role/SpanParser.pm # once (76µs+0s) by Moose::Error::Default::BEGIN@4 at line 4 of Moose/Error/Default.pm # once (76µs+0s) by Class::MOP::BEGIN@5 at line 5 of Class/MOP.pm # once (75µs+0s) by MooseX::Types::Moose::BEGIN@10 at line 10 of MooseX/Types/Moose.pm # once (74µs+0s) by Markdent::Simple::Document::BEGIN@7 at line 7 of Markdent/Simple/Document.pm # once (73µs+0s) by Sub::Install::BEGIN@3 at line 3 of Sub/Install.pm # once (73µs+0s) by MooseX::Types::Util::BEGIN@10 at line 10 of MooseX/Types/Util.pm # once (72µs+0s) by namespace::clean::BEGIN@10 at line 10 of namespace/clean.pm # once (72µs+0s) by Class::MOP::Class::Immutable::Trait::BEGIN@4 at line 4 of Class/MOP/Class/Immutable/Trait.pm # once (72µs+0s) by MooseX::Types::UndefinedType::BEGIN@10 at line 10 of MooseX/Types/UndefinedType.pm # once (71µs+0s) by Markdent::Event::EndDocument::BEGIN@7 at line 7 of Markdent/Event/EndDocument.pm # once (71µs+0s) by Class::MOP::Package::BEGIN@5 at line 5 of Class/MOP/Package.pm # once (71µs+0s) by Class::MOP::Attribute::BEGIN@5 at line 5 of Class/MOP/Attribute.pm # once (70µs+0s) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Array.pm # once (70µs+0s) by Markdent::Dialect::Standard::SpanParser::BEGIN@7 at line 7 of Markdent/Dialect/Standard/SpanParser.pm # once (70µs+0s) by Moose::Meta::Role::Method::Required::BEGIN@5 at line 5 of Moose/Meta/Role/Method/Required.pm # once (70µs+0s) by Markdent::Event::EndHTMLTag::BEGIN@7 at line 7 of Markdent/Event/EndHTMLTag.pm # once (70µs+0s) by re::BEGIN@5 at line 5 of re.pm # once (70µs+0s) by Markdent::Role::DebugPrinter::BEGIN@7 at line 7 of Markdent/Role/DebugPrinter.pm # once (70µs+0s) by Class::MOP::Method::Wrapped::BEGIN@5 at line 5 of Class/MOP/Method/Wrapped.pm # once (70µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (70µs+0s) by Class::MOP::Method::Accessor::BEGIN@5 at line 5 of Class/MOP/Method/Accessor.pm # once (70µs+0s) by Markdent::Event::Image::BEGIN@7 at line 7 of Markdent/Event/Image.pm # once (70µs+0s) by Moose::Meta::TypeConstraint::BEGIN@5 at line 5 of Moose/Meta/TypeConstraint.pm # once (70µs+0s) by Package::Stash::XS::BEGIN@6 at line 6 of Package/Stash/XS.pm # once (70µs+0s) by Package::DeprecationManager::BEGIN@7 at line 7 of Package/DeprecationManager.pm # once (69µs+0s) by Class::MOP::MiniTrait::BEGIN@4 at line 4 of Class/MOP/MiniTrait.pm # once (69µs+0s) by Markdent::Event::EndCode::BEGIN@7 at line 7 of Markdent/Event/EndCode.pm # once (69µs+0s) by Markdent::Event::EndListItem::BEGIN@7 at line 7 of Markdent/Event/EndListItem.pm # once (69µs+0s) by Moose::Util::TypeConstraints::OptimizedConstraints::BEGIN@4 at line 4 of Moose/Util/TypeConstraints/OptimizedConstraints.pm # once (69µs+0s) by Moose::Meta::Method::Destructor::BEGIN@5 at line 5 of Moose/Meta/Method/Destructor.pm # once (69µs+0s) by Moose::Meta::Method::Accessor::Native::String::append::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/String/append.pm # once (69µs+0s) by Moose::Meta::Method::Accessor::Native::Reader::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Reader.pm # once (69µs+0s) by Markdent::Event::HTMLCommentBlock::BEGIN@7 at line 7 of Markdent/Event/HTMLCommentBlock.pm # once (69µs+0s) by Class::MOP::Object::BEGIN@5 at line 5 of Class/MOP/Object.pm # once (69µs+0s) by Sub::Name::BEGIN@45 at line 45 of Sub/Name.pm # once (69µs+0s) by Moose::Meta::Method::Accessor::Native::Array::clear::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Array/clear.pm # once (69µs+0s) by Moose::Meta::Method::Constructor::BEGIN@5 at line 5 of Moose/Meta/Method/Constructor.pm # once (69µs+0s) by Moose::Meta::Method::Accessor::Native::Counter::inc::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Counter/inc.pm # once (69µs+0s) by Moose::Meta::Method::Overridden::BEGIN@4 at line 4 of Moose/Meta/Method/Overridden.pm # once (69µs+0s) by MooseX::Types::Combine::BEGIN@11 at line 11 of MooseX/Types/Combine.pm # once (69µs+0s) by Class::MOP::Class::BEGIN@5 at line 5 of Class/MOP/Class.pm # once (69µs+0s) by Moose::BEGIN@3 at line 3 of Moose.pm # once (69µs+0s) by Markdent::Event::EndStrong::BEGIN@7 at line 7 of Markdent/Event/EndStrong.pm # once (69µs+0s) by Markdent::Role::Handler::BEGIN@7 at line 7 of Markdent/Role/Handler.pm # once (69µs+0s) by Moose::Meta::Method::Accessor::Native::Array::elements::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Array/elements.pm # once (69µs+0s) by Markdent::Event::EndOrderedList::BEGIN@7 at line 7 of Markdent/Event/EndOrderedList.pm # once (69µs+0s) by Markdent::Role::EventsAsMethods::BEGIN@7 at line 7 of Markdent/Role/EventsAsMethods.pm # once (69µs+0s) by Markdent::Event::Text::BEGIN@7 at line 7 of Markdent/Event/Text.pm # once (69µs+0s) by Markdent::Event::StartEmphasis::BEGIN@7 at line 7 of Markdent/Event/StartEmphasis.pm # once (69µs+0s) by Markdent::Event::StartParagraph::BEGIN@7 at line 7 of Markdent/Event/StartParagraph.pm # once (69µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::get::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Hash/get.pm # once (69µs+0s) by Markdent::Role::BalancedEvent::BEGIN@7 at line 7 of Markdent/Role/BalancedEvent.pm # once (69µs+0s) by Markdent::Event::StartHTMLTag::BEGIN@7 at line 7 of Markdent/Event/StartHTMLTag.pm # once (69µs+0s) by Moose::Meta::Method::Meta::BEGIN@5 at line 5 of Moose/Meta/Method/Meta.pm # once (69µs+0s) by Moose::Meta::Method::Augmented::BEGIN@4 at line 4 of Moose/Meta/Method/Augmented.pm # once (68µs+0s) by Devel::GlobalDestruction::BEGIN@6 at line 6 of Devel/GlobalDestruction.pm # once (68µs+0s) by MooseX::StrictConstructor::Role::Meta::Class::BEGIN@7 at line 7 of MooseX/StrictConstructor/Role/Meta/Class.pm # once (68µs+0s) by Class::MOP::Method::Inlined::BEGIN@4 at line 4 of Class/MOP/Method/Inlined.pm # once (68µs+0s) by Markdent::Event::StartHeader::BEGIN@7 at line 7 of Markdent/Event/StartHeader.pm # once (68µs+0s) by Markdent::Event::AutoLink::BEGIN@7 at line 7 of Markdent/Event/AutoLink.pm # once (68µs+0s) by Class::MOP::Method::Constructor::BEGIN@5 at line 5 of Class/MOP/Method/Constructor.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::Array::push::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Array/push.pm # once (68µs+0s) by Markdent::Event::EndUnorderedList::BEGIN@7 at line 7 of Markdent/Event/EndUnorderedList.pm # once (68µs+0s) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Parameterizable.pm # once (68µs+0s) by Moose::Meta::Role::Attribute::BEGIN@4 at line 4 of Moose/Meta/Role/Attribute.pm # once (68µs+0s) by Markdent::Event::HTMLBlock::BEGIN@7 at line 7 of Markdent/Event/HTMLBlock.pm # once (68µs+0s) by Markdent::Event::HorizontalRule::BEGIN@7 at line 7 of Markdent/Event/HorizontalRule.pm # once (68µs+0s) by Class::MOP::Module::BEGIN@5 at line 5 of Class/MOP/Module.pm # once (68µs+0s) by Markdent::Event::Preformatted::BEGIN@7 at line 7 of Markdent/Event/Preformatted.pm # once (68µs+0s) by Markdent::Event::StartCode::BEGIN@7 at line 7 of Markdent/Event/StartCode.pm # once (68µs+0s) by MooseX::StrictConstructor::BEGIN@7 at line 7 of MooseX/StrictConstructor.pm # once (68µs+0s) by Markdent::Event::HTMLComment::BEGIN@7 at line 7 of Markdent/Event/HTMLComment.pm # once (68µs+0s) by Markdent::Types::Internal::BEGIN@7 at line 7 of Markdent/Types/Internal.pm # once (68µs+0s) by Moose::Deprecated::BEGIN@4 at line 4 of Moose/Deprecated.pm # once (68µs+0s) by Markdent::Role::HTMLStream::BEGIN@7 at line 7 of Markdent/Role/HTMLStream.pm # once (68µs+0s) by Moose::Meta::TypeConstraint::Enum::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Enum.pm # once (68µs+0s) by Moose::Meta::Role::Method::BEGIN@5 at line 5 of Moose/Meta/Role/Method.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::Bool::unset::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Bool/unset.pm # once (68µs+0s) by Markdent::Event::StartListItem::BEGIN@7 at line 7 of Markdent/Event/StartListItem.pm # once (68µs+0s) by Moose::Meta::Instance::BEGIN@5 at line 5 of Moose/Meta/Instance.pm # once (68µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@4 at line 4 of Class/MOP/Mixin/HasMethods.pm # once (68µs+0s) by Moose::Meta::Role::Composite::BEGIN@4 at line 4 of Moose/Meta/Role/Composite.pm # once (68µs+0s) by Markdent::Parser::BEGIN@7 at line 7 of Markdent/Parser.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::Bool::set::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Bool/set.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::Array::Writer::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Array/Writer.pm # once (68µs+0s) by MooseX::Params::Validate::BEGIN@4 at line 4 of MooseX/Params/Validate.pm # once (68µs+0s) by Markdent::Event::StartOrderedList::BEGIN@7 at line 7 of Markdent/Event/StartOrderedList.pm # once (68µs+0s) by Markdent::Event::StartStrong::BEGIN@7 at line 7 of Markdent/Event/StartStrong.pm # once (68µs+0s) by Moose::Meta::Method::BEGIN@4 at line 4 of Moose/Meta/Method.pm # once (68µs+0s) by Moose::Meta::Role::Application::ToInstance::BEGIN@4 at line 4 of Moose/Meta/Role/Application/ToInstance.pm # once (68µs+0s) by Moose::Meta::Role::Method::Conflicting::BEGIN@5 at line 5 of Moose/Meta/Role/Method/Conflicting.pm # once (68µs+0s) by Markdent::Event::EndBlockquote::BEGIN@7 at line 7 of Markdent/Event/EndBlockquote.pm # once (68µs+0s) by Class::MOP::Mixin::HasAttributes::BEGIN@4 at line 4 of Class/MOP/Mixin/HasAttributes.pm # once (68µs+0s) by Moose::Meta::Role::Application::ToRole::BEGIN@4 at line 4 of Moose/Meta/Role/Application/ToRole.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native.pm # once (68µs+0s) by Class::MOP::Mixin::AttributeCore::BEGIN@4 at line 4 of Class/MOP/Mixin/AttributeCore.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::String::clear::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/String/clear.pm # once (68µs+0s) by Moose::Meta::TypeCoercion::Union::BEGIN@5 at line 5 of Moose/Meta/TypeCoercion/Union.pm # once (68µs+0s) by Markdent::Handler::HTMLStream::Document::BEGIN@2.3 at line 2 of namespace/autoclean.pm # once (68µs+0s) by Moose::Util::BEGIN@4 at line 4 of Moose/Util.pm # once (68µs+0s) by Class::MOP::Deprecated::BEGIN@4 at line 4 of Class/MOP/Deprecated.pm # once (68µs+0s) by Moose::Meta::Method::Delegation::BEGIN@5 at line 5 of Moose/Meta/Method/Delegation.pm # once (68µs+0s) by Markdent::Dialect::Standard::BlockParser::BEGIN@7 at line 7 of Markdent/Dialect/Standard/BlockParser.pm # once (68µs+0s) by Markdent::Event::EndEmphasis::BEGIN@7 at line 7 of Markdent/Event/EndEmphasis.pm # once (68µs+0s) by Moose::Meta::TypeConstraint::Class::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Class.pm # once (68µs+0s) by Markdent::Role::BlockParser::BEGIN@7 at line 7 of Markdent/Role/BlockParser.pm # once (68µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::Writer::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Hash/Writer.pm # once (68µs+0s) by Moose::Meta::TypeConstraint::Registry::BEGIN@5 at line 5 of Moose/Meta/TypeConstraint/Registry.pm # once (68µs+0s) by Class::MOP::Mixin::BEGIN@4 at line 4 of Class/MOP/Mixin.pm # once (68µs+0s) by MooseX::Types::CheckedUtilExports::BEGIN@12 at line 12 of MooseX/Types/CheckedUtilExports.pm # once (67µs+0s) by Moose::Meta::Method::Accessor::Native::Collection::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Collection.pm # once (67µs+0s) by Markdent::Role::EventAsText::BEGIN@7 at line 7 of Markdent/Role/EventAsText.pm # once (67µs+0s) by Moose::Meta::TypeConstraint::Role::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Role.pm # once (67µs+0s) by MooseX::Types::TypeDecorator::BEGIN@5 at line 5 of MooseX/Types/TypeDecorator.pm # once (67µs+0s) by Moose::Meta::Class::Immutable::Trait::BEGIN@4 at line 4 of Moose/Meta/Class/Immutable/Trait.pm # once (67µs+0s) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Parameterized.pm # once (67µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Hash.pm # once (67µs+0s) by namespace::clean::BEGIN@2.2 at line 2 of B/Hooks/EndOfScope.pm # once (67µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/DuckType.pm # once (67µs+0s) by Moose::Meta::Role::Application::RoleSummation::BEGIN@4 at line 4 of Moose/Meta/Role/Application/RoleSummation.pm # once (67µs+0s) by Moose::Util::MetaRole::BEGIN@4 at line 4 of Moose/Util/MetaRole.pm # once (67µs+0s) by Devel::Caller::BEGIN@3 at line 3 of Devel/Caller.pm # once (67µs+0s) by Moose::Object::BEGIN@5 at line 5 of Moose/Object.pm # once (67µs+0s) by Class::MOP::Method::BEGIN@5 at line 5 of Class/MOP/Method.pm # once (67µs+0s) by Moose::Meta::Role::Application::ToClass::BEGIN@4 at line 4 of Moose/Meta/Role/Application/ToClass.pm # once (67µs+0s) by Markdent::Event::EndParagraph::BEGIN@7 at line 7 of Markdent/Event/EndParagraph.pm # once (67µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::set::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Hash/set.pm # once (67µs+0s) by Moose::Meta::Method::Accessor::Native::Counter::dec::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor/Native/Counter/dec.pm # once (67µs+0s) by Markdent::Role::Event::BEGIN@7 at line 7 of Markdent/Role/Event.pm # once (67µs+0s) by List::AllUtils::BEGIN@4 at line 4 of List/AllUtils.pm # once (67µs+0s) by Moose::Meta::Role::Application::BEGIN@4 at line 4 of Moose/Meta/Role/Application.pm # once (67µs+0s) by Moose::Meta::Attribute::BEGIN@5 at line 5 of Moose/Meta/Attribute.pm # once (66µs+0s) by Data::OptList::BEGIN@4 at line 4 of Data/OptList.pm # once (66µs+0s) by Moose::Meta::Role::BEGIN@5 at line 5 of Moose/Meta/Role.pm # once (66µs+0s) by Package::Stash::BEGIN@6 at line 6 of Package/Stash.pm # once (66µs+0s) by Eval::Closure::BEGIN@6 at line 6 of Eval/Closure.pm # once (66µs+0s) by Markdent::Role::AnyParser::BEGIN@7 at line 7 of Markdent/Role/AnyParser.pm # once (66µs+0s) by Moose::Meta::Class::BEGIN@5 at line 5 of Moose/Meta/Class.pm # once (66µs+0s) by Markdent::Handler::HTMLStream::Document::BEGIN@7 at line 7 of Markdent/Handler/HTMLStream/Document.pm # once (66µs+0s) by Moose::Exporter::BEGIN@4 at line 4 of Moose/Exporter.pm # once (66µs+0s) by MooseX::SemiAffordanceAccessor::Role::Attribute::BEGIN@7 at line 7 of MooseX/SemiAffordanceAccessor/Role/Attribute.pm # once (66µs+0s) by Eval::Closure::BEGIN@3 at line 3 of Sub/Exporter.pm # once (65µs+0s) by mro::BEGIN@11 at line 11 of mro.pm # once (65µs+0s) by metaclass::BEGIN@5 at line 5 of metaclass.pm # once (65µs+0s) by Variable::Magic::BEGIN@6 at line 6 of Variable/Magic.pm # once (64µs+0s) by Moose::Meta::TypeConstraint::Union::BEGIN@5 at line 5 of Moose/Meta/TypeConstraint/Union.pm # once (64µs+0s) by IO::BEGIN@8 at line 8 of IO.pm # once (64µs+0s) by MooseX::StrictConstructor::Role::Object::BEGIN@7 at line 7 of MooseX/StrictConstructor/Role/Object.pm # once (64µs+0s) by Markdent::Types::BEGIN@7 at line 7 of Markdent/Types.pm # once (62µs+0s) by Moose::Role::BEGIN@3 at line 3 of Moose/Role.pm # once (62µs+0s) by Class::MOP::Instance::BEGIN@5 at line 5 of Class/MOP/Instance.pm # once (61µs+0s) by Class::MOP::Method::Meta::BEGIN@5 at line 5 of Class/MOP/Method/Meta.pm
{
339284418.4ms shift;
340
341 my $catmask ;
342 my $fatal = 0 ;
343 my $no_fatal = 0 ;
344
345 my $mask = ${^WARNING_BITS} ;
346
3472621.12ms if (vec($mask, $Offsets{'all'}, 1)) {
348 $mask |= $Bits{'all'} ;
349 $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
350 }
351
352 push @_, 'all' unless @_;
353
354 foreach my $word ( @_ ) {
35512645.99ms if ($word eq 'FATAL') {
356 $fatal = 1;
357 $no_fatal = 0;
358 }
359 elsif ($word eq 'NONFATAL') {
360 $fatal = 0;
361 $no_fatal = 1;
362 }
363 elsif ($catmask = $Bits{$word}) {
364 $mask |= $catmask ;
365 $mask |= $DeadBits{$word} if $fatal ;
366 $mask &= ~($DeadBits{$word}|$All) if $no_fatal ;
367 }
368 else
369 { Croaker("Unknown warnings category '$word'")}
370 }
371
372 ${^WARNING_BITS} = $mask ;
373}
374
375sub unimport
376
# spent 1.01ms within warnings::unimport which was called 15 times, avg 67µs/call: # once (82µs+0s) by Exporter::Heavy::BEGIN@200 at line 200 of Exporter/Heavy.pm # once (80µs+0s) by MRO::Compat::BEGIN@39 at line 39 of MRO/Compat.pm # once (77µs+0s) by Moose::Meta::Role::BEGIN@599 at line 599 of Moose/Meta/Role.pm # once (76µs+0s) by Class::MOP::Class::BEGIN@433 at line 433 of Class/MOP/Class.pm # once (76µs+0s) by namespace::clean::BEGIN@166 at line 166 of namespace/clean.pm # once (72µs+0s) by Moose::Object::BEGIN@101 at line 101 of Moose/Object.pm # once (69µs+0s) by Moose::Util::TypeConstraints::BEGIN@649 at line 649 of Moose/Util/TypeConstraints.pm # once (66µs+0s) by Moose::Exporter::BEGIN@121 at line 121 of Moose/Exporter.pm # once (65µs+0s) by MRO::Compat::BEGIN@226 at line 226 of MRO/Compat.pm # once (60µs+0s) by Class::MOP::Class::BEGIN@455 at line 455 of Class/MOP/Class.pm # once (60µs+0s) by Moose::Meta::Role::BEGIN@621 at line 621 of Moose/Meta/Role.pm # once (58µs+0s) by Moose::Util::TypeConstraints::BEGIN@676 at line 676 of Moose/Util/TypeConstraints.pm # once (55µs+0s) by Moose::Util::TypeConstraints::BEGIN@655 at line 655 of Moose/Util/TypeConstraints.pm # once (54µs+0s) by Carp::BEGIN@301 at line 301 of Carp/Heavy.pm # once (54µs+0s) by Moose::Util::TypeConstraints::BEGIN@660 at line 660 of Moose/Util/TypeConstraints.pm
{
377105872µs shift;
378
379 my $catmask ;
380 my $mask = ${^WARNING_BITS} ;
381
38226107µs if (vec($mask, $Offsets{'all'}, 1)) {
383 $mask |= $Bits{'all'} ;
384 $mask |= $DeadBits{'all'} if vec($mask, $Offsets{'all'}+1, 1);
385 }
386
387 push @_, 'all' unless @_;
388
389 foreach my $word ( @_ ) {
39015244µs if ($word eq 'FATAL') {
391 next;
392 }
393 elsif ($catmask = $Bits{$word}) {
394 $mask &= ~($catmask | $DeadBits{$word} | $All);
395 }
396 else
397 { Croaker("Unknown warnings category '$word'")}
398 }
399
400 ${^WARNING_BITS} = $mask ;
401}
402
403214µsmy %builtin_type; @builtin_type{qw(SCALAR ARRAY HASH CODE REF GLOB LVALUE Regexp)} = ();
404
405sub __chk
406{
407 my $category ;
408 my $offset ;
409 my $isobj = 0 ;
410
411 if (@_) {
412 # check the category supplied.
413 $category = shift ;
414 if (my $type = ref $category) {
415 Croaker("not an object")
416 if exists $builtin_type{$type};
417 $category = $type;
418 $isobj = 1 ;
419 }
420 $offset = $Offsets{$category};
421 Croaker("Unknown warnings category '$category'")
422 unless defined $offset;
423 }
424 else {
425 $category = (caller(1))[0] ;
426 $offset = $Offsets{$category};
427 Croaker("package '$category' not registered for warnings")
428 unless defined $offset ;
429 }
430
431 my $this_pkg = (caller(1))[0] ;
432 my $i = 2 ;
433 my $pkg ;
434
435 if ($isobj) {
436 while (do { { package DB; $pkg = (caller($i++))[0] } } ) {
437 last unless @DB::args && $DB::args[0] =~ /^$category=/ ;
438 }
439 $i -= 2 ;
440 }
441 else {
442 $i = _error_loc(); # see where Carp will allocate the error
443 }
444
445 my $callers_bitmask = (caller($i))[9] ;
446 return ($callers_bitmask, $offset, $i) ;
447}
448
449sub _error_loc {
450 require Carp::Heavy;
451 goto &Carp::short_error_loc; # don't introduce another stack frame
452}
453
454sub enabled
455{
456 Croaker("Usage: warnings::enabled([category])")
457 unless @_ == 1 || @_ == 0 ;
458
459 my ($callers_bitmask, $offset, $i) = __chk(@_) ;
460
461 return 0 unless defined $callers_bitmask ;
462 return vec($callers_bitmask, $offset, 1) ||
463 vec($callers_bitmask, $Offsets{'all'}, 1) ;
464}
465
466
467sub warn
468{
469 Croaker("Usage: warnings::warn([category,] 'message')")
470 unless @_ == 2 || @_ == 1 ;
471
472 my $message = pop ;
473 my ($callers_bitmask, $offset, $i) = __chk(@_) ;
474 require Carp;
475 Carp::croak($message)
476 if vec($callers_bitmask, $offset+1, 1) ||
477 vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
478 Carp::carp($message) ;
479}
480
481sub warnif
482{
483 Croaker("Usage: warnings::warnif([category,] 'message')")
484 unless @_ == 2 || @_ == 1 ;
485
486 my $message = pop ;
487 my ($callers_bitmask, $offset, $i) = __chk(@_) ;
488
489 return
490 unless defined $callers_bitmask &&
491 (vec($callers_bitmask, $offset, 1) ||
492 vec($callers_bitmask, $Offsets{'all'}, 1)) ;
493
494 require Carp;
495 Carp::croak($message)
496 if vec($callers_bitmask, $offset+1, 1) ||
497 vec($callers_bitmask, $Offsets{'all'}+1, 1) ;
498
499 Carp::carp($message) ;
500}
501
5021109µs1;
503# ex: set ro:
 
# spent 19µs within warnings::CORE:match which was called: # once (19µs+0s) by Markdent::Simple::Document::BEGIN@7 at line 13
sub warnings::CORE:match; # opcode
# spent 54µs within warnings::CORE:regcomp which was called: # once (54µs+0s) by Markdent::Simple::Document::BEGIN@7 at line 13
sub warnings::CORE:regcomp; # opcode