| Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/5.22.1/warnings/register.pm |
| Statements | Executed 33 statements in 85µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 6 | 6 | 6 | 76µs | 660µ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 | 700ns | our $VERSION = '1.04'; | ||
| 4 | 1 | 700ns | 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 660µs (76+584) within warnings::register::import which was called 6 times, avg 110µs/call:
# once (18µs+111µs) by version::BEGIN@6 at line 6 of version.pm
# once (12µs+113µs) by overload::BEGIN@144 at line 144 of overload.pm
# once (14µs+95µs) by DateTime::BEGIN@7 at line 7 of DateTime.pm
# once (11µs+91µs) by constant::BEGIN@4 at line 4 of constant.pm
# once (10µs+89µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (10µs+85µs) by Tie::Hash::BEGIN@191 at line 191 of Tie/Hash.pm | ||||
| 19 | 6 | 2µs | shift; | ||
| 20 | 6 | 6µs | my @categories = @_; | ||
| 21 | |||||
| 22 | 6 | 25µs | my $package = (caller(0))[0]; | ||
| 23 | 6 | 13µs | 6 | 584µs | warnings::register_categories($package); # spent 584µs making 6 calls to warnings::register_categories, avg 97µs/call |
| 24 | |||||
| 25 | 6 | 33µs | warnings::register_categories($package . "::$_") for @categories; | ||
| 26 | } | ||||
| 27 | 1 | 5µs | 1; | ||
| 28 | __END__ |