← 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:11 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Subroutines/ProhibitNestedSubs.pm
StatementsExecuted 90407 statements in 679ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
8618111316ms398msPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::__ANON__[:46]Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::__ANON__[:46]
10161111.7ms1.34sPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::violatesPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::violates
14411290µs290µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::applies_toPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::applies_to
11116µs16µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::BEGIN@10Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@10
1118µs12µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::BEGIN@12Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@12
1118µs28µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::BEGIN@13Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@13
1118µs19µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::BEGIN@11Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@11
1117µs150µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::BEGIN@15Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@15
1117µs62µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::BEGIN@16Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@16
1115µs7µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::default_severityPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::default_severity
1112µs2µsPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::supported_parametersPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::supported_parameters
0000s0sPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::::default_themesPerl::Critic::Policy::Subroutines::ProhibitNestedSubs::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::Subroutines::ProhibitNestedSubs;
9
10239µs116µs
# spent 16µs within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@10 which was called: # once (16µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11220µs230µs
# spent 19µs (8+11) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@11 which was called: # once (8µs+11µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 19µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@11 # spent 11µs making 1 call to strict::import
12218µs216µs
# spent 12µs (8+4) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::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::Subroutines::ProhibitNestedSubs::BEGIN@12 # spent 4µs making 1 call to warnings::import
13226µs249µs
# spent 28µs (8+20) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@13 which was called: # once (8µs+20µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 28µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@13 # spent 20µs making 1 call to Exporter::import
14
15224µs2294µs
# spent 150µs (7+143) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@15 which was called: # once (7µs+143µs) by Module::Pluggable::Object::_require at line 15
use Perl::Critic::Utils qw{ :severities };
# spent 150µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@15 # spent 143µs making 1 call to Exporter::import
162177µs2116µs
# spent 62µs (7+54) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@16 which was called: # once (7µs+54µs) by Module::Pluggable::Object::_require at line 16
use base 'Perl::Critic::Policy';
# spent 62µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::BEGIN@16 # spent 54µs making 1 call to base::import
17
181600nsour $VERSION = '1.121';
19
20#-----------------------------------------------------------------------------
21
2212µs128µsReadonly::Scalar my $DESC => q{Nested named subroutine};
# spent 28µs making 1 call to Readonly::Scalar
231900ns120µsReadonly::Scalar my $EXPL =>
# spent 20µs making 1 call to Readonly::Scalar
24 q{Declaring a named sub inside another named sub does not prevent the }
25 . q{inner sub from being global};
26
27#-----------------------------------------------------------------------------
28
2915µs
# spent 2µs within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::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 () }
3011µs
# spent 7µs (5+1) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::default_severity which was called: # once (5µs+1µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm
sub default_severity { return $SEVERITY_HIGHEST }
31sub default_themes { return qw(core bugs) }
32144381µs
# spent 290µs within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::applies_to which was called 144 times, avg 2µs/call: # 144 times (290µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call
sub applies_to { return 'PPI::Statement::Sub' }
33
34#-----------------------------------------------------------------------------
35
36
# spent 1.34s (11.7ms+1.33) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::violates which was called 1016 times, avg 1.32ms/call: # 1016 times (11.7ms+1.33s) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 1.32ms/call
sub violates {
371016380µs my ($self, $elem, $doc) = @_;
38
3910163.46ms10161.35ms return if $elem->isa('PPI::Statement::Scheduled');
# spent 1.35ms making 1016 calls to UNIVERSAL::isa, avg 1µs/call
40
41 my $inner = $elem->find_first(
42
# spent 398ms (316+82.4) within Perl::Critic::Policy::Subroutines::ProhibitNestedSubs::__ANON__[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Subroutines/ProhibitNestedSubs.pm:46] which was called 86181 times, avg 5µs/call: # 86181 times (316ms+82.4ms) by PPI::Node::find_first at line 438 of PPI/Node.pm, avg 5µs/call
sub {
43 return
4486181664ms8618182.4ms $_[1]->isa('PPI::Statement::Sub')
# spent 71.0ms making 83574 calls to UNIVERSAL::isa, avg 850ns/call # spent 11.4ms making 2604 calls to PPI::Structure::List::isa, avg 4µs/call # spent 17µs making 3 calls to PPI::Structure::For::isa, avg 6µs/call
45 && ! $_[1]->isa('PPI::Statement::Scheduled');
46 }
4710164.15ms10161.32s );
# spent 1.32s making 1016 calls to PPI::Node::find_first, avg 1.30ms/call
4810166.20ms return if not $inner;
49
50 # Must be a violation...
51 return $self->violation($DESC, $EXPL, $inner);
52}
53
5413µs1;
55
56__END__