← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:40 2014

Filename/opt/perl-5.18.1/lib/5.18.1/warnings/register.pm
StatementsExecuted 18 statements in 36µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
33329µs287µswarnings::register::::importwarnings::register::import
0000s0swarnings::register::::mkMaskwarnings::register::mkMask
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package warnings::register;
2
31700nsour $VERSION = '1.02';
4
5=pod
6
7=head1 NAME
8
9warnings::register - warnings import function
10
11=head1 SYNOPSIS
12
13 use warnings::register;
14
15=head1 DESCRIPTION
16
17Creates a warnings category with the same name as the current package.
18
19See L<warnings> and L<perllexwarn> for more information on this module's
20usage.
21
22=cut
23
241400nsrequire warnings;
25
26# left here as cruft in case other users were using this undocumented routine
27# -- rjbs, 2010-09-08
28sub mkMask
29{
30 my ($bit) = @_;
31 my $mask = "";
32
33 vec($mask, $bit, 1) = 1;
34 return $mask;
35}
36
37sub import
38
# spent 287µs (29+257) within warnings::register::import which was called 3 times, avg 96µs/call: # once (11µs+92µs) by vars::BEGIN@7 at line 7 of vars.pm # once (9µs+88µs) by constant::BEGIN@4 at line 4 of constant.pm # once (9µs+77µs) by overload::BEGIN@144 at line 144 of overload.pm
{
393500ns shift;
4032µs my @categories = @_;
41
42310µs my $package = (caller(0))[0];
4335µs3258µs warnings::register_categories($package);
# spent 258µs making 3 calls to warnings::register_categories, avg 86µs/call
44
45314µs warnings::register_categories($package . "::$_") for @categories;
46}
47
4814µs1;