| Filename | /usr/libdata/perl5/warnings/register.pm |
| Statements | Executed 13 statements in 43µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 2 | 2 | 2 | 32µs | 406µs | warnings::register::import |
| 0 | 0 | 0 | 0s | 0s | warnings::register::mkMask |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package warnings::register; | ||||
| 2 | |||||
| 3 | 1 | 900ns | our $VERSION = '1.04'; | ||
| 4 | 1 | 900ns | 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 406µs (32+374) within warnings::register::import which was called 2 times, avg 203µs/call:
# once (19µs+202µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (12µs+173µs) by constant::BEGIN@4 at line 4 of constant.pm | ||||
| 19 | 2 | 1µs | shift; | ||
| 20 | 2 | 2µs | my @categories = @_; | ||
| 21 | |||||
| 22 | 2 | 10µs | my $package = (caller(0))[0]; | ||
| 23 | 2 | 12µs | 2 | 374µs | warnings::register_categories($package); # spent 374µs making 2 calls to warnings::register_categories, avg 187µs/call |
| 24 | |||||
| 25 | 2 | 12µs | warnings::register_categories($package . "::$_") for @categories; | ||
| 26 | } | ||||
| 27 | 1 | 4µs | 1; | ||
| 28 | __END__ |