Filename | /usr/share/perl/5.26/warnings/register.pm |
Statements | Executed 13 statements in 37µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 2 | 24µs | 263µs | import | warnings::register::
0 | 0 | 0 | 0s | 0s | mkMask | warnings::register::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package warnings::register; | ||||
2 | |||||
3 | 1 | 1µs | our $VERSION = '1.04'; | ||
4 | 1 | 800ns | require warnings; | ||
5 | |||||
6 | # left here as cruft in case other users were using this undocumented routine | ||||
7 | # -- rjbs, 2010-09-08 | ||||
8 | sub mkMask | ||||
9 | { | ||||
10 | my ($bit) = @_; | ||||
11 | my $mask = ""; | ||||
12 | |||||
13 | vec($mask, $bit, 1) = 1; | ||||
14 | return $mask; | ||||
15 | } | ||||
16 | |||||
17 | sub import | ||||
18 | # spent 263µs (24+239) within warnings::register::import which was called 2 times, avg 131µs/call:
# once (17µs+160µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (7µs+79µs) by constant::BEGIN@4 at line 4 of constant.pm | ||||
19 | 2 | 800ns | shift; | ||
20 | 2 | 2µs | my @categories = @_; | ||
21 | |||||
22 | 2 | 8µs | my $package = (caller(0))[0]; | ||
23 | 2 | 4µs | 2 | 239µs | warnings::register_categories($package); # spent 239µs making 2 calls to warnings::register_categories, avg 120µs/call |
24 | |||||
25 | 2 | 13µs | warnings::register_categories($package . "::$_") for @categories; | ||
26 | } | ||||
27 | 1 | 8µs | 1; | ||
28 | __END__ |