Filename | /Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/warnings/register.pm |
Statements | Executed 38 statements in 95µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
7 | 7 | 7 | 46µs | 216µ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 | 0s | our $VERSION = '1.04'; | ||
4 | 1 | 1µs | 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 216µs (46+170) within warnings::register::import which was called 7 times, avg 31µs/call:
# once (8µs+56µs) by overload::BEGIN@145 at line 145 of overload.pm
# once (7µs+29µs) by Tie::Hash::BEGIN@191 at line 191 of Tie/Hash.pm
# once (6µs+21µs) by version::BEGIN@6 at line 6 of version.pm
# once (6µs+19µs) by Socket::BEGIN@698 at line 698 of Socket.pm
# once (6µs+17µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (7µs+14µs) by flock::BEGIN@131 at line 131 of Path/Tiny.pm
# once (6µs+14µs) by constant::BEGIN@4 at line 4 of constant.pm | ||||
19 | 7 | 1µs | shift; | ||
20 | 7 | 4µs | my @categories = @_; | ||
21 | |||||
22 | 7 | 17µs | my $package = (caller(0))[0]; | ||
23 | 7 | 11µs | 7 | 170µs | warnings::register_categories($package); # spent 170µs making 7 calls to warnings::register_categories, avg 24µs/call |
24 | |||||
25 | 7 | 59µs | warnings::register_categories($package . "::$_") for @categories; | ||
26 | } | ||||
27 | 1 | 2µs | 1; | ||
28 | __END__ |