Filename | /usr/share/perl/5.28/warnings/register.pm |
Statements | Executed 23 statements in 40µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 4 | 4 | 31µs | 128µ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 | 300ns | our $VERSION = '1.04'; | ||
4 | 1 | 200ns | 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 128µs (31+97) within warnings::register::import which was called 4 times, avg 32µs/call:
# once (9µs+26µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (10µs+24µs) by overload::BEGIN@142 at line 142 of overload.pm
# once (6µs+25µs) by constant::BEGIN@4 at line 4 of constant.pm
# once (6µs+21µs) by flock::BEGIN@132 at line 132 of Path/Tiny.pm | ||||
19 | 4 | 1µs | shift; | ||
20 | 4 | 2µs | my @categories = @_; | ||
21 | |||||
22 | 4 | 10µs | my $package = (caller(0))[0]; | ||
23 | 4 | 9µs | 4 | 97µs | warnings::register_categories($package); # spent 97µs making 4 calls to warnings::register_categories, avg 24µs/call |
24 | |||||
25 | 4 | 15µs | warnings::register_categories($package . "::$_") for @categories; | ||
26 | } | ||||
27 | 1 | 3µs | 1; | ||
28 | __END__ |