| Filename | /usr/share/perl/5.14/warnings/register.pm |
| Statements | Executed 18 statements in 20µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 3 | 3 | 17µs | 136µ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 | 300ns | our $VERSION = '1.02'; | ||
| 4 | |||||
| 5 | 1 | 300ns | require warnings; | ||
| 6 | |||||
| 7 | # left here as cruft in case other users were using this undocumented routine | ||||
| 8 | # -- rjbs, 2010-09-08 | ||||
| 9 | sub mkMask | ||||
| 10 | { | ||||
| 11 | my ($bit) = @_; | ||||
| 12 | my $mask = ""; | ||||
| 13 | |||||
| 14 | vec($mask, $bit, 1) = 1; | ||||
| 15 | return $mask; | ||||
| 16 | } | ||||
| 17 | |||||
| 18 | sub import | ||||
| 19 | # spent 136µs (17+120) within warnings::register::import which was called 3 times, avg 45µs/call:
# once (6µs+42µs) by overload::BEGIN@147 at line 147 of overload.pm
# once (5µs+39µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (5µs+39µs) by constant::BEGIN@4 at line 4 of constant.pm | ||||
| 20 | 3 | 500ns | shift; | ||
| 21 | 3 | 2µs | my @categories = @_; | ||
| 22 | |||||
| 23 | 3 | 6µs | my $package = (caller(0))[0]; | ||
| 24 | 3 | 3µs | 3 | 120µs | warnings::register_categories($package); # spent 120µs making 3 calls to warnings::register_categories, avg 40µs/call |
| 25 | |||||
| 26 | 3 | 7µs | warnings::register_categories($package . "::$_") for @categories; | ||
| 27 | } | ||||
| 28 | |||||
| 29 | 1 | 2µs | 1; |