Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Modules/RequireBarewordIncludes.pm |
Statements | Executed 5071 statements in 11.2ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
982 | 1 | 1 | 7.37ms | 20.9ms | violates | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
144 | 1 | 1 | 259µs | 259µs | applies_to | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 19µs | 19µs | BEGIN@10 | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 8µs | 45µs | BEGIN@13 | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 8µs | 12µs | BEGIN@12 | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 8µs | 64µs | BEGIN@16 | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 8µs | 161µs | BEGIN@15 | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 7µs | 19µs | BEGIN@11 | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 6µs | 8µs | default_severity | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
1 | 1 | 1 | 2µs | 2µs | supported_parameters | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
0 | 0 | 0 | 0s | 0s | default_themes | Perl::Critic::Policy::Modules::RequireBarewordIncludes::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | ############################################################################## | ||||
2 | # $URL$ | ||||
3 | # $Date$ | ||||
4 | # $Author$ | ||||
5 | # $Revision$ | ||||
6 | ############################################################################## | ||||
7 | |||||
8 | package Perl::Critic::Policy::Modules::RequireBarewordIncludes; | ||||
9 | |||||
10 | 2 | 41µs | 1 | 19µs | # spent 19µs within Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@10 which was called:
# once (19µs+0s) by Module::Pluggable::Object::_require at line 10 # spent 19µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@10 |
11 | 2 | 21µs | 2 | 31µs | # spent 19µs (7+12) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@11 which was called:
# once (7µs+12µs) by Module::Pluggable::Object::_require at line 11 # spent 19µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@11
# spent 12µs making 1 call to strict::import |
12 | 2 | 19µs | 2 | 15µs | # spent 12µs (8+4) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@12 which was called:
# once (8µs+4µs) by Module::Pluggable::Object::_require at line 12 # spent 12µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@12
# spent 4µs making 1 call to warnings::import |
13 | 2 | 26µs | 2 | 82µs | # spent 45µs (8+37) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@13 which was called:
# once (8µs+37µs) by Module::Pluggable::Object::_require at line 13 # spent 45µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@13
# spent 37µs making 1 call to Exporter::import |
14 | |||||
15 | 2 | 24µs | 2 | 314µs | # spent 161µs (8+153) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@15 which was called:
# once (8µs+153µs) by Module::Pluggable::Object::_require at line 15 # spent 161µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@15
# spent 153µs making 1 call to Exporter::import |
16 | 2 | 167µs | 2 | 120µs | # spent 64µs (8+56) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@16 which was called:
# once (8µs+56µs) by Module::Pluggable::Object::_require at line 16 # spent 64µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@16
# spent 56µs making 1 call to base::import |
17 | |||||
18 | 1 | 500ns | our $VERSION = '1.121'; | ||
19 | |||||
20 | #----------------------------------------------------------------------------- | ||||
21 | |||||
22 | 1 | 2µs | 1 | 28µs | Readonly::Scalar my $EXPL => q{Use a bareword instead}; # spent 28µs making 1 call to Readonly::Scalar |
23 | |||||
24 | #----------------------------------------------------------------------------- | ||||
25 | |||||
26 | 1 | 4µs | # spent 2µs within Perl::Critic::Policy::Modules::RequireBarewordIncludes::supported_parameters which was called:
# once (2µs+0s) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm | ||
27 | 1 | 2µs | # spent 8µs (6+2) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::default_severity which was called:
# once (6µs+2µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm | ||
28 | sub default_themes { return qw(core portability) } | ||||
29 | 144 | 370µs | # spent 259µs within Perl::Critic::Policy::Modules::RequireBarewordIncludes::applies_to which was called 144 times, avg 2µs/call:
# 144 times (259µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call | ||
30 | |||||
31 | #----------------------------------------------------------------------------- | ||||
32 | |||||
33 | # spent 20.9ms (7.37+13.5) within Perl::Critic::Policy::Modules::RequireBarewordIncludes::violates which was called 982 times, avg 21µs/call:
# 982 times (7.37ms+13.5ms) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 21µs/call | ||||
34 | 982 | 267µs | my ( $self, $elem, undef ) = @_; | ||
35 | |||||
36 | 982 | 984µs | 982 | 11.8ms | my $child = $elem->schild(1); # spent 11.8ms making 982 calls to PPI::Node::schild, avg 12µs/call |
37 | 982 | 2.58ms | 982 | 629µs | return if !$child; # spent 629µs making 982 calls to PPI::Util::TRUE, avg 640ns/call |
38 | |||||
39 | 982 | 2.97ms | 982 | 1.12ms | if ( $child->isa('PPI::Token::Quote') ) { # spent 1.12ms making 982 calls to UNIVERSAL::isa, avg 1µs/call |
40 | my $type = $elem->type; | ||||
41 | my $desc = qq{"$type" statement with library name as string}; | ||||
42 | return $self->violation( $desc, $EXPL, $elem ); | ||||
43 | } | ||||
44 | 982 | 3.67ms | return; #ok! | ||
45 | } | ||||
46 | |||||
47 | |||||
48 | 1 | 3µs | 1; | ||
49 | |||||
50 | __END__ |