← Index
NYTProf Performance Profile   « line view »
For ../dm5dm6_ex3
  Run on Tue Feb 24 07:41:47 2015
Reported on Tue Feb 24 07:41:51 2015

Filename/usr/lib/perl5/5.20.1/warnings/register.pm
StatementsExecuted 13 statements in 15µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
22212µs103µ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
31300nsour $VERSION = '1.03';
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> for more information on this module's usage.
20
21=cut
22
231200nsrequire warnings;
24
25# left here as cruft in case other users were using this undocumented routine
26# -- rjbs, 2010-09-08
27sub mkMask
28{
29 my ($bit) = @_;
30 my $mask = "";
31
32 vec($mask, $bit, 1) = 1;
33 return $mask;
34}
35
36sub import
37
# spent 103µs (12+91) within warnings::register::import which was called 2 times, avg 52µs/call: # once (6µs+48µs) by constant::BEGIN@4 at line 4 of constant.pm # once (6µs+43µs) by vars::BEGIN@7 at line 7 of vars.pm
{
382400ns shift;
3921µs my @categories = @_;
40
4124µs my $package = (caller(0))[0];
4223µs291µs warnings::register_categories($package);
# spent 91µs making 2 calls to warnings::register_categories, avg 46µs/call
43
4425µs warnings::register_categories($package . "::$_") for @categories;
45}
46
4712µs1;