| Filename | /usr/share/perl/5.10/strict.pm |
| Statements | Executed 350 statements in 803µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 50 | 42 | 41 | 178µs | 191µs | strict::import |
| 27 | 4 | 2 | 174µs | 174µs | strict::bits |
| 23 | 23 | 13 | 171µs | 313µs | strict::unimport |
| 1 | 1 | 1 | 18µs | 18µs | strict::CORE:regcomp (opcode) |
| 1 | 1 | 1 | 7µs | 7µs | strict::CORE:match (opcode) |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package strict; | ||||
| 2 | |||||
| 3 | 1 | 800ns | $strict::VERSION = "1.04"; | ||
| 4 | |||||
| 5 | # Verify that we're called correctly so that strictures will work. | ||||
| 6 | 1 | 37µs | 2 | 25µs | unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { # spent 18µs making 1 call to strict::CORE:regcomp
# spent 7µs making 1 call to strict::CORE:match |
| 7 | # Can't use Carp, since Carp uses us! | ||||
| 8 | my (undef, $f, $l) = caller; | ||||
| 9 | die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n"); | ||||
| 10 | } | ||||
| 11 | |||||
| 12 | 1 | 2µs | my %bitmask = ( | ||
| 13 | refs => 0x00000002, | ||||
| 14 | subs => 0x00000200, | ||||
| 15 | vars => 0x00000400 | ||||
| 16 | ); | ||||
| 17 | |||||
| 18 | # spent 174µs within strict::bits which was called 27 times, avg 6µs/call:
# 23 times (142µs+0s) by strict::unimport at line 41, avg 6µs/call
# 2 times (13µs+0s) by strict::import at line 36, avg 6µs/call
# once (11µs+0s) by main::BEGIN@5 at line 32
# once (8µs+0s) by Mouse::Exporter::BEGIN@10 at line 11 of Mouse/Exporter.pm | ||||
| 19 | 27 | 12µs | my $bits = 0; | ||
| 20 | 27 | 6µs | my @wrong; | ||
| 21 | 27 | 37µs | foreach my $s (@_) { | ||
| 22 | 32 | 15µs | push @wrong, $s unless exists $bitmask{$s}; | ||
| 23 | 32 | 50µs | $bits |= $bitmask{$s} || 0; | ||
| 24 | } | ||||
| 25 | 27 | 10µs | if (@wrong) { | ||
| 26 | require Carp; | ||||
| 27 | Carp::croak("Unknown 'strict' tag(s) '@wrong'"); | ||||
| 28 | } | ||||
| 29 | 27 | 104µs | $bits; | ||
| 30 | } | ||||
| 31 | |||||
| 32 | 1 | 3µs | 1 | 11µs | my $default_bits = bits(qw(refs subs vars)); # spent 11µs making 1 call to strict::bits |
| 33 | |||||
| 34 | # spent 191µs (178+13) within strict::import which was called 50 times, avg 4µs/call:
# 9 times (23µs+0s) by Any::Moose::import at line 50 of Any/Moose.pm, avg 3µs/call
# once (7µs+6µs) by vars::BEGIN@8 at line 8 of vars.pm
# once (7µs+7µs) by base::BEGIN@3 at line 3 of base.pm
# once (6µs+0s) by DateTime::TimeZone::BEGIN@8 at line 8 of DateTime/TimeZone.pm
# once (5µs+0s) by main::BEGIN@5 at line 5 of mongo_pain.pl
# once (4µs+0s) by DateTime::Infinite::BEGIN@6 at line 6 of DateTime/Infinite.pm
# once (4µs+0s) by DateTime::Locale::Catalog::BEGIN@17 at line 17 of DateTime/Locale/Catalog.pm
# once (4µs+0s) by List::Util::BEGIN@11 at line 11 of List/Util.pm
# once (4µs+0s) by Tie::IxHash::BEGIN@12 at line 12 of Tie/IxHash.pm
# once (4µs+0s) by DateTime::TimeZone::Local::BEGIN@6 at line 6 of DateTime/TimeZone/Local.pm
# once (4µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm
# once (4µs+0s) by DateTime::Locale::BEGIN@3 at line 3 of DateTime/Locale.pm
# once (4µs+0s) by Mouse::Exporter::BEGIN@2 at line 2 of Mouse/Exporter.pm
# once (4µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm
# once (4µs+0s) by Digest::base::BEGIN@3 at line 3 of Digest/base.pm
# once (4µs+0s) by Config::BEGIN@9 at line 9 of Config.pm
# once (4µs+0s) by DateTime::Locale::en_US::BEGIN@21 at line 21 of DateTime/Locale/en_US.pm
# once (4µs+0s) by Digest::MD5::BEGIN@3 at line 3 of Digest/MD5.pm
# once (4µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm
# once (4µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm
# once (4µs+0s) by DateTime::Locale::root::BEGIN@21 at line 21 of DateTime/Locale/root.pm
# once (4µs+0s) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm
# once (4µs+0s) by mro::BEGIN@10 at line 10 of mro.pm
# once (4µs+0s) by Class::Load::BEGIN@2 at line 2 of Class/Load.pm
# once (4µs+0s) by Params::Validate::BEGIN@3.2 at line 3 of Params/ValidateXS.pm
# once (4µs+0s) by boolean::BEGIN@3 at line 3 of boolean.pm
# once (4µs+0s) by Params::Validate::BEGIN@3 at line 3 of Params/Validate.pm
# once (4µs+0s) by parent::BEGIN@2 at line 2 of parent.pm
# once (4µs+0s) by main::BEGIN@17 at line 17 of MongoDB.pm
# once (3µs+0s) by DateTime::TimeZone::Floating::BEGIN@6 at line 6 of DateTime/TimeZone/Floating.pm
# once (3µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@6 at line 6 of DateTime/TimeZone/OffsetOnly.pm
# once (3µs+0s) by DateTime::BEGIN@8 at line 8 of DateTime.pm
# once (3µs+0s) by DateTime::Duration::BEGIN@6 at line 6 of DateTime/Duration.pm
# once (3µs+0s) by DateTime::Locale::Base::BEGIN@3 at line 3 of DateTime/Locale/Base.pm
# once (3µs+0s) by constant::BEGIN@3 at line 3 of constant.pm
# once (3µs+0s) by DateTime::Locale::en::BEGIN@21 at line 21 of DateTime/Locale/en.pm
# once (3µs+0s) by DateTime::Helpers::BEGIN@6 at line 6 of DateTime/Helpers.pm
# once (3µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl
# once (3µs+0s) by Any::Moose::BEGIN@8 at line 8 of Any/Moose.pm
# once (3µs+0s) by DateTime::TimeZone::UTC::BEGIN@6 at line 6 of DateTime/TimeZone/UTC.pm
# once (3µs+0s) by Time::Local::BEGIN@6 at line 6 of Time/Local.pm
# once (3µs+0s) by DateTime::TimeZone::Catalog::BEGIN@13 at line 13 of DateTime/TimeZone/Catalog.pm | ||||
| 35 | 50 | 17µs | shift; | ||
| 36 | 50 | 311µs | 2 | 13µs | $^H |= @_ ? bits(@_) : $default_bits; # spent 13µs making 2 calls to strict::bits, avg 6µs/call |
| 37 | } | ||||
| 38 | |||||
| 39 | # spent 313µs (171+142) within strict::unimport which was called 23 times, avg 14µs/call:
# once (11µs+6µs) by Any::Moose::BEGIN@69 at line 69 of Any/Moose.pm
# once (9µs+8µs) by parent::BEGIN@25 at line 25 of parent.pm
# once (7µs+9µs) by Config::BEGIN@35 at line 35 of Config.pm
# once (8µs+7µs) by constant::BEGIN@38 at line 38 of constant.pm
# once (8µs+6µs) by File::Spec::Unix::BEGIN@65 at line 65 of File/Spec/Unix.pm
# once (7µs+6µs) by Class::Load::BEGIN@122 at line 122 of Class/Load.pm
# once (7µs+6µs) by Mouse::Exporter::BEGIN@230 at line 230 of Mouse/Exporter.pm
# once (7µs+6µs) by DateTime::Infinite::BEGIN@15 at line 15 of DateTime/Infinite.pm
# once (7µs+6µs) by Mouse::Meta::Module::BEGIN@299 at line 299 of Mouse/Meta/Module.pm
# once (7µs+6µs) by Mouse::Meta::Module::BEGIN@220 at line 220 of Mouse/Meta/Module.pm
# once (7µs+6µs) by constant::BEGIN@101 at line 101 of constant.pm
# once (7µs+6µs) by Mouse::Util::BEGIN@95 at line 95 of Mouse/Util.pm
# once (7µs+6µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm
# once (7µs+6µs) by DateTime::Locale::Base::BEGIN@363 at line 363 of DateTime/Locale/Base.pm
# once (7µs+6µs) by Mouse::Exporter::BEGIN@96 at line 96 of Mouse/Exporter.pm
# once (7µs+6µs) by Any::Moose::BEGIN@191 at line 191 of Any/Moose.pm
# once (7µs+6µs) by DateTime::Locale::Base::BEGIN@25 at line 25 of DateTime/Locale/Base.pm
# once (7µs+6µs) by DateTime::Locale::Base::BEGIN@119 at line 119 of DateTime/Locale/Base.pm
# once (7µs+6µs) by Mouse::Util::BEGIN@14 at line 14 of Mouse/Util.pm
# once (7µs+6µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm
# once (7µs+6µs) by DateTime::Locale::Base::BEGIN@176 at line 176 of DateTime/Locale/Base.pm
# once (7µs+6µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm
# once (7µs+6µs) by Mouse::Meta::Class::BEGIN@26 at line 26 of Mouse/Meta/Class.pm | ||||
| 40 | 23 | 9µs | shift; | ||
| 41 | 23 | 174µs | 23 | 142µs | $^H &= ~ (@_ ? bits(@_) : $default_bits); # spent 142µs making 23 calls to strict::bits, avg 6µs/call |
| 42 | } | ||||
| 43 | |||||
| 44 | 1 | 14µs | 1; | ||
| 45 | __END__ | ||||
# spent 7µs within strict::CORE:match which was called:
# once (7µs+0s) by main::BEGIN@5 at line 6 | |||||
# spent 18µs within strict::CORE:regcomp which was called:
# once (18µs+0s) by main::BEGIN@5 at line 6 |