← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/hailo
  Run on Thu Oct 21 22:50:37 2010
Reported on Thu Oct 21 22:52:06 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/warnings/register.pm
StatementsExecuted 23 statements in 78µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
44467µs737µ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
312µsour $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
2411µsrequire 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 737µs (67+670) within warnings::register::import which was called 4 times, avg 184µs/call: # once (17µs+175µs) by Tie::Hash::BEGIN@189 at line 189 of Tie/Hash.pm # once (17µs+169µs) by constant::BEGIN@4 at line 4 of constant.pm # once (16µs+166µs) by overload::BEGIN@145 at line 145 of overload.pm # once (17µs+161µs) by vars::BEGIN@7 at line 7 of vars.pm
{
392072µs shift;
40 my @categories = @_;
41
42 my $package = (caller(0))[0];
434670µs warnings::register_categories($package);
# spent 670µs making 4 calls to warnings::register_categories, avg 168µs/call
44
45 warnings::register_categories($package . "::$_") for @categories;
46}
47
4813µs1;