Filename | /home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3/strict.pm |
Statements | Executed 1572 statements in 1.58ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
117 | 2 | 1 | 708µs | 708µs | bits | strict::
66 | 66 | 63 | 303µs | 746µs | import | strict::
51 | 51 | 25 | 268µs | 533µs | unimport | strict::
1 | 1 | 1 | 10µs | 10µs | CORE:regcomp (opcode) | strict::
1 | 1 | 1 | 3µs | 3µs | CORE:match (opcode) | strict::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package strict; | ||||
2 | |||||
3 | 1 | 400ns | $strict::VERSION = "1.07"; | ||
4 | |||||
5 | # Verify that we're called correctly so that strictures will work. | ||||
6 | 1 | 23µs | 2 | 13µs | unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { # spent 10µs making 1 call to strict::CORE:regcomp
# spent 3µ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 | 1 | 500ns | my %explicit_bitmask = ( | ||
18 | refs => 0x00000020, | ||||
19 | subs => 0x00000040, | ||||
20 | vars => 0x00000080 | ||||
21 | ); | ||||
22 | |||||
23 | sub bits { | ||||
24 | 117 | 36µs | my $bits = 0; | ||
25 | 117 | 18µs | my @wrong; | ||
26 | 117 | 103µs | foreach my $s (@_) { | ||
27 | 249 | 102µs | if (exists $bitmask{$s}) { | ||
28 | 249 | 159µs | $^H |= $explicit_bitmask{$s}; | ||
29 | } | ||||
30 | else { push @wrong, $s }; | ||||
31 | 249 | 149µs | $bits |= $bitmask{$s} || 0; | ||
32 | } | ||||
33 | 117 | 28µs | if (@wrong) { | ||
34 | require Carp; | ||||
35 | Carp::croak("Unknown 'strict' tag(s) '@wrong'"); | ||||
36 | } | ||||
37 | 117 | 346µs | $bits; | ||
38 | } | ||||
39 | |||||
40 | 1 | 700ns | my @default_bits = qw(refs subs vars); | ||
41 | |||||
42 | # spent 746µs (303+443) within strict::import which was called 66 times, avg 11µs/call:
# once (11µs+15µs) by Digest::base::BEGIN@3 at line 3 of Digest/base.pm
# once (8µs+14µs) by Digest::MD5::BEGIN@3 at line 3 of Digest/MD5.pm
# once (8µs+9µs) by Benchmark::Perl::Formance::BEGIN@6 at line 6 of lib/Benchmark/Perl/Formance.pm
# once (6µs+10µs) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm
# once (6µs+9µs) by Config::Perl::V::BEGIN@5 at line 5 of Config/Perl/V.pm
# once (4µs+12µs) by Class::XSAccessor::Heavy::BEGIN@5 at line 5 of Class/XSAccessor/Heavy.pm
# once (8µs+7µs) by Cwd::BEGIN@170 at line 170 of Cwd.pm
# once (6µs+9µs) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm
# once (6µs+9µs) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm
# once (5µs+8µs) by Data::DPath::BEGIN@2 at line 2 of Sub/Exporter.pm
# once (5µs+8µs) by Exception::Class::BEGIN@8 at line 8 of Exception/Class.pm
# once (6µs+7µs) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm
# once (5µs+8µs) by Carp::BEGIN@4 at line 4 of Carp.pm
# once (5µs+7µs) by File::Find::BEGIN@3 at line 3 of File/Find.pm
# once (4µs+8µs) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm
# once (5µs+7µs) by Safe::BEGIN@28 at line 28 of Safe.pm
# once (6µs+7µs) by Text::Balanced::BEGIN@7 at line 7 of Text/Balanced.pm
# once (5µs+7µs) by aliased::BEGIN@7 at line 7 of aliased.pm
# once (5µs+6µs) by File::Basename::BEGIN@50 at line 50 of File/Basename.pm
# once (4µs+8µs) by utf8::BEGIN@2 at line 2 of utf8_heavy.pl
# once (5µs+7µs) by Exception::Class::Base::BEGIN@6 at line 6 of Exception/Class/Base.pm
# once (5µs+6µs) by Data::YAML::Writer::BEGIN@3 at line 3 of Data/YAML/Writer.pm
# once (5µs+7µs) by Sys::Hostname::BEGIN@3 at line 3 of Sys/Hostname.pm
# once (5µs+6µs) by Config::BEGIN@5 at line 5 of Config_heavy.pl
# once (4µs+7µs) by Data::Structure::Util::BEGIN@5 at line 5 of Data/Structure/Util.pm
# once (5µs+6µs) by Config::BEGIN@9 at line 9 of Config.pm
# once (4µs+7µs) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm
# once (4µs+6µs) by Sub::Install::BEGIN@4 at line 4 of Sub/Install.pm
# once (4µs+7µs) by Getopt::Long::BEGIN@17 at line 17 of Getopt/Long.pm
# once (4µs+6µs) by Data::DPath::Step::BEGIN@10 at line 10 of Data/DPath/Step.pm
# once (4µs+7µs) by constant::BEGIN@3 at line 3 of constant.pm
# once (4µs+6µs) by Sys::Info::Constants::BEGIN@2 at line 2 of Sys/Info/Constants.pm
# once (4µs+6µs) by Sys::Info::BEGIN@2 at line 2 of Sys/Info.pm
# once (4µs+6µs) by List::Util::BEGIN@9 at line 9 of List/Util.pm
# once (4µs+6µs) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm
# once (4µs+6µs) by IO::File::BEGIN@128 at line 128 of IO/File.pm
# once (4µs+6µs) by Devel::Platform::Info::BEGIN@3 at line 3 of Devel/Platform/Info.pm
# once (4µs+6µs) by Sys::Info::Base::BEGIN@2 at line 2 of Sys/Info/Base.pm
# once (4µs+6µs) by POSIX::BEGIN@2 at line 2 of POSIX.pm
# once (4µs+6µs) by Opcode::BEGIN@5 at line 5 of Opcode.pm
# once (4µs+6µs) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm
# once (4µs+6µs) by B::BEGIN@9 at line 9 of B.pm
# once (4µs+6µs) by Data::DPath::Point::BEGIN@10 at line 10 of Data/DPath/Point.pm
# once (4µs+6µs) by Data::DPath::Context::BEGIN@15.4 at line 15 of Iterator/Util.pm
# once (4µs+6µs) by Data::DPath::Attrs::BEGIN@10 at line 10 of Data/DPath/Attrs.pm
# once (4µs+6µs) by File::Find::BEGIN@349 at line 349 of File/Find.pm
# once (4µs+6µs) by Data::DPath::Context::BEGIN@10 at line 10 of Data/DPath/Context.pm
# once (4µs+6µs) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm
# once (4µs+6µs) by Data::DPath::BEGIN@13 at line 13 of Data/DPath.pm
# once (4µs+6µs) by Class::XSAccessor::Array::BEGIN@3 at line 3 of Class/XSAccessor/Array.pm
# once (4µs+6µs) by Sub::Exporter::BEGIN@1 at line 1 of Data/OptList.pm
# once (4µs+6µs) by Data::DPath::Filters::BEGIN@10 at line 10 of Data/DPath/Filters.pm
# once (4µs+6µs) by SelfLoader::BEGIN@3 at line 3 of SelfLoader.pm
# once (4µs+6µs) by Iterator::Util::BEGIN@15 at line 15 of Iterator.pm
# once (4µs+6µs) by Devel::StackTrace::BEGIN@8 at line 8 of Devel/StackTrace.pm
# once (4µs+5µs) by Devel::StackTrace::Frame::BEGIN@6 at line 6 of Devel/StackTrace/Frame.pm
# once (4µs+6µs) by Data::DPath::Path::BEGIN@10 at line 10 of Data/DPath/Path.pm
# once (4µs+6µs) by Class::XSAccessor::BEGIN@3 at line 3 of Class/XSAccessor.pm
# once (4µs+5µs) by vars::BEGIN@8 at line 8 of vars.pm
# once (4µs+5µs) by IO::Handle::BEGIN@261 at line 261 of IO/Handle.pm
# once (3µs+6µs) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm
# once (4µs+5µs) by SelfLoader::BEGIN@93 at line 93 of SelfLoader.pm
# once (3µs+5µs) by IO::BEGIN@7 at line 7 of IO.pm
# once (5µs+4µs) by Iterator::Util::BEGIN@373 at line 373 of Iterator/Util.pm
# once (4µs+5µs) by Class::Data::Inheritable::BEGIN@3 at line 3 of Class/Data/Inheritable.pm
# once (4µs+4µs) by base::BEGIN@3 at line 3 of base.pm | ||||
43 | 66 | 12µs | shift; | ||
44 | 66 | 317µs | 66 | 443µs | $^H |= bits(@_ ? @_ : @default_bits); # spent 443µs making 66 calls to strict::bits, avg 7µs/call |
45 | } | ||||
46 | |||||
47 | # spent 533µs (268+265) within strict::unimport which was called 51 times, avg 10µs/call:
# once (9µs+11µs) by utf8::BEGIN@654 at line 654 of utf8_heavy.pl
# once (8µs+10µs) by Data::DPath::Context::BEGIN@158 at line 158 of Data/DPath/Context.pm
# once (9µs+8µs) by Carp::BEGIN@398 at line 398 of Carp.pm
# once (7µs+9µs) by constant::BEGIN@65 at line 65 of constant.pm
# once (7µs+7µs) by Carp::BEGIN@413 at line 413 of Carp.pm
# once (6µs+8µs) by Safe::BEGIN@188 at line 188 of Safe.pm
# once (6µs+7µs) by File::Spec::Unix::BEGIN@149 at line 149 of File/Spec/Unix.pm
# once (8µs+5µs) by Cwd::BEGIN@823 at line 823 of Cwd.pm
# once (7µs+6µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm
# once (6µs+6µs) by utf8::BEGIN@153 at line 153 of utf8_heavy.pl
# once (7µs+5µs) by B::BEGIN@254 at line 254 of B.pm
# once (6µs+5µs) by IO::Handle::BEGIN@628 at line 628 of IO/Handle.pm
# once (5µs+6µs) by SelfLoader::BEGIN@73 at line 73 of SelfLoader.pm
# once (5µs+5µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm
# once (5µs+6µs) by POSIX::BEGIN@204 at line 204 of POSIX.pm
# once (7µs+3µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
# once (6µs+5µs) by Sub::Install::BEGIN@184 at line 184 of Sub/Install.pm
# once (5µs+5µs) by Iterator::Util::BEGIN@284 at line 284 of Iterator/Util.pm
# once (5µs+5µs) by Benchmark::Perl::Formance::BEGIN@723 at line 723 of lib/Benchmark/Perl/Formance.pm
# once (4µs+6µs) by SelfLoader::BEGIN@158 at line 158 of SelfLoader.pm
# once (6µs+5µs) by Config::BEGIN@45 at line 45 of Config.pm
# once (5µs+5µs) by Benchmark::Perl::Formance::BEGIN@478 at line 478 of lib/Benchmark/Perl/Formance.pm
# once (5µs+4µs) by Sys::Info::BEGIN@18 at line 18 of Sys/Info.pm
# once (4µs+5µs) by Data::DPath::Context::BEGIN@424 at line 424 of Data/DPath/Context.pm
# once (5µs+4µs) by aliased::BEGIN@44 at line 44 of aliased.pm
# once (5µs+5µs) by constant::BEGIN@29 at line 29 of constant.pm
# once (5µs+5µs) by Benchmark::Perl::Formance::BEGIN@155 at line 155 of lib/Benchmark/Perl/Formance.pm
# once (5µs+5µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm
# once (5µs+5µs) by Sys::Info::BEGIN@77 at line 77 of Sys/Info.pm
# once (5µs+5µs) by Benchmark::Perl::Formance::BEGIN@261 at line 261 of lib/Benchmark/Perl/Formance.pm
# once (5µs+5µs) by Data::DPath::Context::BEGIN@222 at line 222 of Data/DPath/Context.pm
# once (5µs+4µs) by constant::BEGIN@127 at line 127 of constant.pm
# once (4µs+5µs) by Exception::Class::Base::BEGIN@44 at line 44 of Exception/Class/Base.pm
# once (5µs+4µs) by Carp::BEGIN@67 at line 67 of Carp.pm
# once (4µs+5µs) by Exception::Class::BEGIN@46 at line 46 of Exception/Class.pm
# once (4µs+4µs) by Exception::Class::BEGIN@168 at line 168 of Exception/Class.pm
# once (4µs+4µs) by Class::XSAccessor::Heavy::BEGIN@27 at line 27 of Class/XSAccessor/Heavy.pm
# once (4µs+4µs) by Safe::BEGIN@282 at line 282 of Safe.pm
# once (4µs+4µs) by Iterator::Util::BEGIN@370 at line 370 of Iterator/Util.pm
# once (4µs+4µs) by Safe::BEGIN@334 at line 334 of Safe.pm
# once (4µs+4µs) by Time::HiRes::BEGIN@43 at line 43 of Time/HiRes.pm
# once (4µs+4µs) by SelfLoader::BEGIN@91 at line 91 of SelfLoader.pm
# once (4µs+5µs) by List::Util::BEGIN@30 at line 30 of List/Util.pm
# once (5µs+4µs) by Devel::StackTrace::Frame::BEGIN@11 at line 11 of Devel/StackTrace/Frame.pm
# once (4µs+5µs) by Safe::BEGIN@36 at line 36 of Safe.pm
# once (4µs+4µs) by Carp::BEGIN@18 at line 18 of Carp.pm
# once (4µs+4µs) by Exception::Class::BEGIN@79 at line 79 of Exception/Class.pm
# once (4µs+4µs) by Exception::Class::Base::BEGIN@64 at line 64 of Exception/Class/Base.pm
# once (4µs+4µs) by Carp::BEGIN@8 at line 8 of Carp.pm
# once (4µs+4µs) by Safe::BEGIN@341 at line 341 of Safe.pm
# once (4µs+4µs) by Exception::Class::BEGIN@176 at line 176 of Exception/Class.pm | ||||
48 | 51 | 11µs | shift; | ||
49 | 51 | 263µs | 51 | 265µs | $^H &= ~ bits(@_ ? @_ : @default_bits); # spent 265µs making 51 calls to strict::bits, avg 5µs/call |
50 | } | ||||
51 | |||||
52 | 1 | 8µs | 1; | ||
53 | __END__ | ||||
# spent 3µs within strict::CORE:match which was called:
# once (3µs+0s) by Benchmark::Perl::Formance::BEGIN@6 at line 6 | |||||
# spent 10µs within strict::CORE:regcomp which was called:
# once (10µs+0s) by Benchmark::Perl::Formance::BEGIN@6 at line 6 |