← 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/ProhibitExplicitReturnUndef.pm
StatementsExecuted 36105 statements in 84.2ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
134811170.4ms620msPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::violatesPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::violates
14411309µs309µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::applies_toPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::applies_to
41120µs24µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::default_severityPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::default_severity
11116µs16µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::BEGIN@10Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@10
1117µs391µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::BEGIN@15Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@15
1117µs11µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::BEGIN@12Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@12
1117µs27µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::BEGIN@13Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@13
1117µs60µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::BEGIN@16Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@16
1117µs18µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::BEGIN@11Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@11
1112µs2µsPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::supported_parametersPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::supported_parameters
0000s0sPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::::default_themesPerl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::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::ProhibitExplicitReturnUndef;
9
10237µs116µs
# spent 16µs within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@10 which was called: # once (16µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11219µs229µs
# spent 18µs (7+11) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@11 which was called: # once (7µs+11µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 18µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@11 # spent 11µs making 1 call to strict::import
12217µs214µs
# spent 11µs (7+4) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@12 which was called: # once (7µs+4µs) by Module::Pluggable::Object::_require at line 12
use warnings;
# spent 11µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@12 # spent 4µs making 1 call to warnings::import
13222µs248µs
# spent 27µs (7+20) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@13 which was called: # once (7µs+20µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 27µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@13 # spent 20µs making 1 call to Exporter::import
14
15223µs2775µs
# spent 391µs (7+384) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@15 which was called: # once (7µs+384µs) by Module::Pluggable::Object::_require at line 15
use Perl::Critic::Utils qw{ :severities :classification };
# spent 391µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@15 # spent 384µs making 1 call to Exporter::import
162158µs2114µs
# spent 60µs (7+53) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@16 which was called: # once (7µs+53µs) by Module::Pluggable::Object::_require at line 16
use base 'Perl::Critic::Policy';
# spent 60µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@16 # spent 53µs making 1 call to base::import
17
181500nsour $VERSION = '1.121';
19
20#-----------------------------------------------------------------------------
21
2212µs128µsReadonly::Scalar my $DESC => q{"return" statement with explicit "undef"};
# spent 28µs making 1 call to Readonly::Scalar
2312µs142µsReadonly::Scalar my $EXPL => [ 199 ];
# spent 42µs making 1 call to Readonly::Scalar
24
25#-----------------------------------------------------------------------------
26
2714µs
# spent 2µs within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::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 () }
2847µs
# spent 24µs (20+5) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::default_severity which was called 4 times, avg 6µs/call: # 4 times (20µs+5µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm, avg 6µs/call
sub default_severity { return $SEVERITY_HIGHEST }
29sub default_themes { return qw(core pbp bugs certrec ) }
30144405µs
# spent 309µs within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::applies_to which was called 144 times, avg 2µs/call: # 144 times (309µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call
sub applies_to { return 'PPI::Token::Word' }
31
32#-----------------------------------------------------------------------------
33
34
# spent 620ms (70.4+550) within Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::violates which was called 13481 times, avg 46µs/call: # 13481 times (70.4ms+550ms) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 46µs/call
sub violates {
35134813.21ms my ( $self, $elem, undef ) = @_;
361348154.0ms13481266ms return if ($elem ne 'return');
# spent 266ms making 13481 calls to PPI::Element::__ne, avg 20µs/call
3721012.33ms2101218ms return if is_hash_key($elem);
# spent 218ms making 2101 calls to Perl::Critic::Utils::is_hash_key, avg 104µs/call
38
3921012.34ms210151.4ms my $sib = $elem->snext_sibling();
# spent 51.4ms making 2101 calls to PPI::Element::snext_sibling, avg 24µs/call
4021015.58ms20991.25ms return if !$sib;
# spent 1.25ms making 2099 calls to PPI::Util::TRUE, avg 594ns/call
41209914.3ms20992.76ms return if !$sib->isa('PPI::Token::Word');
# spent 2.00ms making 1944 calls to UNIVERSAL::isa, avg 1µs/call # spent 761µs making 155 calls to PPI::Structure::List::isa, avg 5µs/call
425731.70ms5739.59ms return if $sib ne 'undef';
# spent 9.59ms making 573 calls to PPI::Element::__ne, avg 17µs/call
43
44 # Must be 'return undef'
45316µs385µs return $self->violation( $DESC, $EXPL, $elem );
# spent 85µs making 3 calls to Perl::Critic::Policy::violation, avg 28µs/call
46}
47
4813µs1;
49
50__END__