Filename | /usr/lib/x86_64-linux-gnu/perl-base/warnings/register.pm |
Statements | Executed 43 statements in 59µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
8 | 8 | 8 | 50µs | 162µ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 | 200ns | our $VERSION = '1.04'; | ||
4 | 1 | 300ns | 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 162µs (50+111) within warnings::register::import which was called 8 times, avg 20µs/call:
# once (18µs+22µs) by Socket::BEGIN@698 at line 698 of Socket.pm
# once (4µs+14µs) by IO::Select::BEGIN@10 at line 10 of IO/Select.pm
# once (4µs+14µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (5µs+13µs) by overload::BEGIN@145 at line 145 of overload.pm
# once (5µs+13µs) by constant::BEGIN@4 at line 4 of constant.pm
# once (5µs+13µs) by Tie::Hash::BEGIN@6 at line 6 of Tie/Hash.pm
# once (5µs+12µs) by version::BEGIN@6 at line 6 of version.pm
# once (4µs+9µs) by File::Find::BEGIN@5 at line 5 of File/Find.pm | ||||
19 | 8 | 1µs | shift; | ||
20 | 8 | 14µs | my @categories = @_; | ||
21 | |||||
22 | 8 | 14µs | my $package = (caller(0))[0]; | ||
23 | 8 | 10µs | 8 | 111µs | warnings::register_categories($package); # spent 111µs making 8 calls to warnings::register_categories, avg 14µs/call |
24 | |||||
25 | 8 | 17µs | warnings::register_categories($package . "::$_") for @categories; | ||
26 | } | ||||
27 | 1 | 2µs | 1; | ||
28 | __END__ |