Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/strict.pm |
Statements | Executed 563 statements in 4.69ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
48 | 48 | 22 | 1.27ms | 2.34ms | unimport | strict::
50 | 3 | 1 | 1.26ms | 1.26ms | bits | strict::
52 | 52 | 49 | 881µs | 1.03ms | import | strict::
1 | 1 | 1 | 85µs | 85µs | CORE:regcomp (opcode) | strict::
1 | 1 | 1 | 33µs | 33µs | CORE:match (opcode) | strict::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package strict; | ||||
2 | |||||
3 | 1 | 3µs | $strict::VERSION = "1.04"; | ||
4 | |||||
5 | # Verify that we're called correctly so that strictures will work. | ||||
6 | 1 | 173µs | 2 | 118µs | unless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) { # spent 85µs making 1 call to strict::CORE:regcomp
# spent 33µ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 | 9µs | my %bitmask = ( | ||
13 | refs => 0x00000002, | ||||
14 | subs => 0x00000200, | ||||
15 | vars => 0x00000400 | ||||
16 | ); | ||||
17 | |||||
18 | sub bits { | ||||
19 | 358 | 1.66ms | my $bits = 0; | ||
20 | my @wrong; | ||||
21 | foreach my $s (@_) { | ||||
22 | push @wrong, $s unless exists $bitmask{$s}; | ||||
23 | $bits |= $bitmask{$s} || 0; | ||||
24 | } | ||||
25 | if (@wrong) { | ||||
26 | require Carp; | ||||
27 | Carp::croak("Unknown 'strict' tag(s) '@wrong'"); | ||||
28 | } | ||||
29 | $bits; | ||||
30 | } | ||||
31 | |||||
32 | 1 | 16µs | 1 | 38µs | my $default_bits = bits(qw(refs subs vars)); # spent 38µs making 1 call to strict::bits |
33 | |||||
34 | # spent 1.03ms (881µs+146µs) within strict::import which was called 52 times, avg 20µs/call:
# once (113µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm
# once (24µs+77µs) by Class::Data::Inheritable::BEGIN@3 at line 3 of Class/Data/Inheritable.pm
# once (27µs+28µs) by base::BEGIN@3 at line 3 of base.pm
# once (24µs+24µs) by vars::BEGIN@8 at line 8 of vars.pm
# once (22µs+17µs) by Iterator::Util::BEGIN@373 at line 373 of Iterator/Util.pm
# once (22µs+0s) by main::BEGIN@6 at line 6 of bin/dpath
# once (18µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm
# once (18µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm
# once (17µs+0s) by Data::DPath::BEGIN@2.8 at line 2 of Sub/Exporter.pm
# once (17µs+0s) by utf8::BEGIN@2 at line 2 of utf8_heavy.pl
# once (17µs+0s) by Attribute::Handlers::BEGIN@5 at line 5 of Attribute/Handlers.pm
# once (17µs+0s) by attributes::BEGIN@9 at line 9 of attributes.pm
# once (17µs+0s) by Data::DPath::Context::BEGIN@15.4 at line 15 of Iterator/Util.pm
# once (17µs+0s) by Data::DPath::BEGIN@11 at line 11 of Data/DPath.pm
# once (16µs+0s) by aliased::BEGIN@8 at line 8 of aliased.pm
# once (16µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm
# once (16µs+0s) by Data::DPath::Filters::BEGIN@10 at line 10 of Data/DPath/Filters.pm
# once (16µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm
# once (16µs+0s) by Text::Balanced::BEGIN@7 at line 7 of Text/Balanced.pm
# once (16µs+0s) by Data::DPath::Point::BEGIN@10 at line 10 of Data/DPath/Point.pm
# once (16µs+0s) by Devel::StackTrace::BEGIN@8 at line 8 of Devel/StackTrace.pm
# once (16µs+0s) by Safe::BEGIN@28 at line 28 of Safe.pm
# once (16µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm
# once (15µs+0s) by Data::DPath::Context::BEGIN@10 at line 10 of Data/DPath/Context.pm
# once (15µs+0s) by Data::DPath::Step::BEGIN@10 at line 10 of Data/DPath/Step.pm
# once (15µs+0s) by Opcode::BEGIN@5 at line 5 of Opcode.pm
# once (15µs+0s) by Iterator::Util::BEGIN@15 at line 15 of Iterator.pm
# once (15µs+0s) by IO::BEGIN@7 at line 7 of IO.pm
# once (15µs+0s) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm
# once (14µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm
# once (14µs+0s) by Data::DPath::Attrs::BEGIN@10 at line 10 of Data/DPath/Attrs.pm
# once (14µs+0s) by constant::BEGIN@3 at line 3 of constant.pm
# once (14µs+0s) by List::Util::BEGIN@11 at line 11 of List/Util.pm
# once (13µs+0s) by Exception::Class::BEGIN@8 at line 8 of Exception/Class.pm
# once (13µs+0s) by App::Rad::BEGIN@6 at line 6 of App/Rad.pm
# once (13µs+0s) by Sub::Install::BEGIN@4 at line 4 of Sub/Install.pm
# once (13µs+0s) by B::BEGIN@9 at line 9 of B.pm
# once (13µs+0s) by IO::Handle::BEGIN@261 at line 261 of IO/Handle.pm
# once (13µs+0s) by App::Rad::Help::BEGIN@3 at line 3 of App/Rad/Help.pm
# once (12µs+0s) by Config::BEGIN@9 at line 9 of Config.pm
# once (12µs+0s) by Class::XSAccessor::Array::BEGIN@3 at line 3 of Class/XSAccessor/Array.pm
# once (12µs+0s) by Class::XSAccessor::Heavy::BEGIN@5 at line 5 of Class/XSAccessor/Heavy.pm
# once (12µs+0s) by Class::XSAccessor::BEGIN@3 at line 3 of Class/XSAccessor.pm
# once (11µs+0s) by SelfLoader::BEGIN@3 at line 3 of SelfLoader.pm
# once (11µs+0s) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm
# once (11µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm
# once (11µs+0s) by Data::DPath::Path::BEGIN@10 at line 10 of Data/DPath/Path.pm
# once (11µs+0s) by Exception::Class::Base::BEGIN@6 at line 6 of Exception/Class/Base.pm
# once (11µs+0s) by Devel::StackTrace::Frame::BEGIN@6 at line 6 of Devel/StackTrace/Frame.pm
# once (11µs+0s) by SelfLoader::BEGIN@93 at line 93 of SelfLoader.pm
# once (10µs+0s) by Attribute::Handlers::BEGIN@17 at line 17 of Attribute/Handlers.pm
# once (10µs+0s) by Sub::Exporter::BEGIN@1 at line 1 of Data/OptList.pm | ||||
35 | 104 | 1.44ms | shift; | ||
36 | 4 | 146µs | $^H |= @_ ? bits(@_) : $default_bits; # spent 146µs making 4 calls to strict::bits, avg 37µs/call | ||
37 | } | ||||
38 | |||||
39 | # spent 2.34ms (1.27+1.07) within strict::unimport which was called 48 times, avg 49µs/call:
# once (43µs+35µs) by B::BEGIN@254 at line 254 of B.pm
# once (42µs+34µs) by IO::Handle::BEGIN@624 at line 624 of IO/Handle.pm
# once (41µs+32µs) by Carp::BEGIN@398 at line 398 of Carp.pm
# once (40µs+30µs) by utf8::BEGIN@399 at line 399 of utf8_heavy.pl
# once (38µs+31µs) by Safe::BEGIN@191 at line 191 of Safe.pm
# once (38µs+30µs) by Iterator::Util::BEGIN@284 at line 284 of Iterator/Util.pm
# once (35µs+29µs) by Data::DPath::Context::BEGIN@424 at line 424 of Data/DPath/Context.pm
# once (33µs+30µs) by Sub::Install::BEGIN@184 at line 184 of Sub/Install.pm
# once (32µs+26µs) by File::Spec::Unix::BEGIN@149 at line 149 of File/Spec/Unix.pm
# once (28µs+28µs) by aliased::BEGIN@35 at line 35 of aliased.pm
# once (30µs+26µs) by App::Rad::BEGIN@93 at line 93 of App/Rad.pm
# once (26µs+29µs) by Carp::BEGIN@8 at line 8 of Carp.pm
# once (28µs+26µs) by Safe::BEGIN@36 at line 36 of Safe.pm
# once (29µs+24µs) by Data::DPath::Context::BEGIN@158 at line 158 of Data/DPath/Context.pm
# once (30µs+23µs) by Attribute::Handlers::BEGIN@124 at line 124 of Attribute/Handlers.pm
# once (28µs+25µs) by Class::XSAccessor::Heavy::BEGIN@27 at line 27 of Class/XSAccessor/Heavy.pm
# once (28µs+24µs) by Exception::Class::Base::BEGIN@43 at line 43 of Exception/Class/Base.pm
# once (25µs+26µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm
# once (23µs+28µs) by Devel::StackTrace::Frame::BEGIN@11 at line 11 of Devel/StackTrace/Frame.pm
# once (27µs+24µs) by Exception::Class::BEGIN@46 at line 46 of Exception/Class.pm
# once (23µs+28µs) by SelfLoader::BEGIN@91 at line 91 of SelfLoader.pm
# once (28µs+22µs) by Safe::BEGIN@337 at line 337 of Safe.pm
# once (26µs+24µs) by Config::BEGIN@45 at line 45 of Config.pm
# once (26µs+24µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm
# once (26µs+23µs) by utf8::BEGIN@123 at line 123 of utf8_heavy.pl
# once (23µs+25µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
# once (27µs+22µs) by Safe::BEGIN@285 at line 285 of Safe.pm
# once (26µs+22µs) by Exception::Class::BEGIN@168 at line 168 of Exception/Class.pm
# once (26µs+22µs) by Attribute::Handlers::BEGIN@199 at line 199 of Attribute/Handlers.pm
# once (25µs+22µs) by constant::BEGIN@29 at line 29 of constant.pm
# once (25µs+22µs) by Attribute::Handlers::BEGIN@148 at line 148 of Attribute/Handlers.pm
# once (25µs+21µs) by Attribute::Handlers::BEGIN@15 at line 15 of Attribute/Handlers.pm
# once (24µs+21µs) by Iterator::Util::BEGIN@370 at line 370 of Iterator/Util.pm
# once (24µs+19µs) by Exception::Class::BEGIN@176 at line 176 of Exception/Class.pm
# once (26µs+17µs) by Carp::BEGIN@18 at line 18 of Carp.pm
# once (22µs+20µs) by Data::DPath::Context::BEGIN@222 at line 222 of Data/DPath/Context.pm
# once (22µs+19µs) by constant::BEGIN@114 at line 114 of constant.pm
# once (22µs+19µs) by Carp::BEGIN@67 at line 67 of Carp.pm
# once (20µs+18µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm
# once (20µs+18µs) by Exception::Class::BEGIN@79 at line 79 of Exception/Class.pm
# once (19µs+18µs) by Exception::Class::Base::BEGIN@63 at line 63 of Exception/Class/Base.pm
# once (18µs+18µs) by App::Rad::BEGIN@121 at line 121 of App/Rad.pm
# once (19µs+17µs) by Carp::BEGIN@413 at line 413 of Carp.pm
# once (18µs+17µs) by constant::BEGIN@52 at line 52 of constant.pm
# once (18µs+16µs) by Safe::BEGIN@344 at line 344 of Safe.pm
# once (16µs+0s) by SelfLoader::BEGIN@73 at line 73 of SelfLoader.pm
# once (14µs+0s) by SelfLoader::BEGIN@158 at line 158 of SelfLoader.pm
# once (14µs+0s) by main::BEGIN@1.9 at line 1 of (eval 47)[Attribute/Handlers.pm:218] | ||||
40 | 96 | 1.34ms | shift; | ||
41 | 45 | 1.07ms | $^H &= ~ (@_ ? bits(@_) : $default_bits); # spent 1.07ms making 45 calls to strict::bits, avg 24µs/call | ||
42 | } | ||||
43 | |||||
44 | 1 | 38µs | 1; | ||
45 | __END__ | ||||
# spent 33µs within strict::CORE:match which was called:
# once (33µs+0s) by main::BEGIN@6 at line 6 | |||||
# spent 85µs within strict::CORE:regcomp which was called:
# once (85µs+0s) by main::BEGIN@6 at line 6 |