| Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/5.22.1/warnings/register.pm |
| Statements | Executed 33 statements in 63µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 6 | 6 | 6 | 57µs | 510µ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 | 500ns | our $VERSION = '1.04'; | ||
| 4 | 1 | 600ns | 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 510µs (57+453) within warnings::register::import which was called 6 times, avg 85µs/call:
# once (13µs+84µs) by version::BEGIN@6 at line 6 of version.pm
# once (10µs+81µs) by constant::BEGIN@4 at line 4 of constant.pm
# once (8µs+81µs) by overload::BEGIN@144 at line 144 of overload.pm
# once (10µs+70µs) by DateTime::BEGIN@7 at line 7 of DateTime.pm
# once (8µs+70µs) by Tie::Hash::BEGIN@191 at line 191 of Tie/Hash.pm
# once (8µs+67µs) by vars::BEGIN@7 at line 7 of vars.pm | ||||
| 19 | 6 | 1µs | shift; | ||
| 20 | 6 | 5µs | my @categories = @_; | ||
| 21 | |||||
| 22 | 6 | 18µs | my $package = (caller(0))[0]; | ||
| 23 | 6 | 11µs | 6 | 452µs | warnings::register_categories($package); # spent 452µs making 6 calls to warnings::register_categories, avg 75µs/call |
| 24 | |||||
| 25 | 6 | 24µs | warnings::register_categories($package . "::$_") for @categories; | ||
| 26 | } | ||||
| 27 | 1 | 3µs | 1; | ||
| 28 | __END__ |