← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:12 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Modules/RequireBarewordIncludes.pm
StatementsExecuted 5071 statements in 11.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
982117.37ms20.9msPerl::Critic::Policy::Modules::RequireBarewordIncludes::::violatesPerl::Critic::Policy::Modules::RequireBarewordIncludes::violates
14411259µs259µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::applies_toPerl::Critic::Policy::Modules::RequireBarewordIncludes::applies_to
11119µs19µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::BEGIN@10Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@10
1118µs45µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::BEGIN@13Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@13
1118µs12µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::BEGIN@12Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@12
1118µs64µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::BEGIN@16Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@16
1118µs161µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::BEGIN@15Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@15
1117µs19µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::BEGIN@11Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@11
1116µs8µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::default_severityPerl::Critic::Policy::Modules::RequireBarewordIncludes::default_severity
1112µs2µsPerl::Critic::Policy::Modules::RequireBarewordIncludes::::supported_parametersPerl::Critic::Policy::Modules::RequireBarewordIncludes::supported_parameters
0000s0sPerl::Critic::Policy::Modules::RequireBarewordIncludes::::default_themesPerl::Critic::Policy::Modules::RequireBarewordIncludes::default_themes
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1##############################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6##############################################################################
7
8package Perl::Critic::Policy::Modules::RequireBarewordIncludes;
9
10241µs119µ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
use 5.006001;
11221µs231µ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
use strict;
# spent 19µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@11 # spent 12µs making 1 call to strict::import
12219µs215µ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
use warnings;
# spent 12µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@12 # spent 4µs making 1 call to warnings::import
13226µs282µ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
use Readonly;
# spent 45µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@13 # spent 37µs making 1 call to Exporter::import
14
15224µs2314µ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
use Perl::Critic::Utils qw{ :severities };
# spent 161µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@15 # spent 153µs making 1 call to Exporter::import
162167µs2120µ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
use base 'Perl::Critic::Policy';
# spent 64µs making 1 call to Perl::Critic::Policy::Modules::RequireBarewordIncludes::BEGIN@16 # spent 56µs making 1 call to base::import
17
181500nsour $VERSION = '1.121';
19
20#-----------------------------------------------------------------------------
21
2212µs128µsReadonly::Scalar my $EXPL => q{Use a bareword instead};
# spent 28µs making 1 call to Readonly::Scalar
23
24#-----------------------------------------------------------------------------
25
2614µ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
sub supported_parameters { return () }
2712µ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
sub default_severity { return $SEVERITY_HIGHEST }
28sub default_themes { return qw(core portability) }
29144370µ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
sub applies_to { return 'PPI::Statement::Include' }
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
sub violates {
34982267µs my ( $self, $elem, undef ) = @_;
35
36982984µs98211.8ms my $child = $elem->schild(1);
# spent 11.8ms making 982 calls to PPI::Node::schild, avg 12µs/call
379822.58ms982629µs return if !$child;
# spent 629µs making 982 calls to PPI::Util::TRUE, avg 640ns/call
38
399822.97ms9821.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 }
449823.67ms return; #ok!
45}
46
47
4813µs1;
49
50__END__