← Index
NYTProf Performance Profile   « line view »
For bin/benchmark-perlformance
  Run on Fri Apr 17 15:31:48 2015
Reported on Fri Apr 17 15:32:02 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3/warnings/register.pm
StatementsExecuted 33 statements in 70µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
66659µs445µ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
31400nsour $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
241200nsrequire 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 445µs (59+386) within warnings::register::import which was called 6 times, avg 74µs/call: # once (15µs+107µs) by overload::BEGIN@146 at line 146 of overload.pm # once (10µs+64µs) by Data::Structure::Util::BEGIN@6 at line 6 of Data/Structure/Util.pm # once (10µs+57µs) by Tie::Hash::BEGIN@189 at line 189 of Tie/Hash.pm # once (9µs+57µs) by File::Find::BEGIN@5 at line 5 of File/Find.pm # once (9µs+51µs) by vars::BEGIN@7 at line 7 of vars.pm # once (8µs+49µs) by constant::BEGIN@4 at line 4 of constant.pm
{
3962µs shift;
4066µs my @categories = @_;
41
42620µs my $package = (caller(0))[0];
43612µs6386µs warnings::register_categories($package);
# spent 386µs making 6 calls to warnings::register_categories, avg 64µs/call
44
45627µs warnings::register_categories($package . "::$_") for @categories;
46}
47
4812µs1;