| Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/Subroutines/ProhibitExplicitReturnUndef.pm |
| Statements | Executed 36105 statements in 84.2ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 13481 | 1 | 1 | 70.4ms | 620ms | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::violates |
| 144 | 1 | 1 | 309µs | 309µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::applies_to |
| 4 | 1 | 1 | 20µs | 24µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::default_severity |
| 1 | 1 | 1 | 16µs | 16µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@10 |
| 1 | 1 | 1 | 7µs | 391µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@15 |
| 1 | 1 | 1 | 7µs | 11µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@12 |
| 1 | 1 | 1 | 7µs | 27µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@13 |
| 1 | 1 | 1 | 7µs | 60µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@16 |
| 1 | 1 | 1 | 7µs | 18µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@11 |
| 1 | 1 | 1 | 2µs | 2µs | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::supported_parameters |
| 0 | 0 | 0 | 0s | 0s | Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::default_themes |
| 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::Subroutines::ProhibitExplicitReturnUndef; | ||||
| 9 | |||||
| 10 | 2 | 37µs | 1 | 16µ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 # spent 16µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@10 |
| 11 | 2 | 19µs | 2 | 29µ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 # spent 18µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@11
# spent 11µs making 1 call to strict::import |
| 12 | 2 | 17µs | 2 | 14µ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 # spent 11µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@12
# spent 4µs making 1 call to warnings::import |
| 13 | 2 | 22µs | 2 | 48µ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 # spent 27µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@13
# spent 20µs making 1 call to Exporter::import |
| 14 | |||||
| 15 | 2 | 23µs | 2 | 775µ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 # spent 391µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@15
# spent 384µs making 1 call to Exporter::import |
| 16 | 2 | 158µs | 2 | 114µ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 # spent 60µs making 1 call to Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef::BEGIN@16
# spent 53µ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 $DESC => q{"return" statement with explicit "undef"}; # spent 28µs making 1 call to Readonly::Scalar |
| 23 | 1 | 2µs | 1 | 42µs | Readonly::Scalar my $EXPL => [ 199 ]; # spent 42µs making 1 call to Readonly::Scalar |
| 24 | |||||
| 25 | #----------------------------------------------------------------------------- | ||||
| 26 | |||||
| 27 | 1 | 4µ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 | ||
| 28 | 4 | 7µ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 | ||
| 29 | sub default_themes { return qw(core pbp bugs certrec ) } | ||||
| 30 | 144 | 405µ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 | ||
| 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 | ||||
| 35 | 13481 | 3.21ms | my ( $self, $elem, undef ) = @_; | ||
| 36 | 13481 | 54.0ms | 13481 | 266ms | return if ($elem ne 'return'); # spent 266ms making 13481 calls to PPI::Element::__ne, avg 20µs/call |
| 37 | 2101 | 2.33ms | 2101 | 218ms | return if is_hash_key($elem); # spent 218ms making 2101 calls to Perl::Critic::Utils::is_hash_key, avg 104µs/call |
| 38 | |||||
| 39 | 2101 | 2.34ms | 2101 | 51.4ms | my $sib = $elem->snext_sibling(); # spent 51.4ms making 2101 calls to PPI::Element::snext_sibling, avg 24µs/call |
| 40 | 2101 | 5.58ms | 2099 | 1.25ms | return if !$sib; # spent 1.25ms making 2099 calls to PPI::Util::TRUE, avg 594ns/call |
| 41 | 2099 | 14.3ms | 2099 | 2.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 |
| 42 | 573 | 1.70ms | 573 | 9.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' | ||||
| 45 | 3 | 16µs | 3 | 85µs | return $self->violation( $DESC, $EXPL, $elem ); # spent 85µs making 3 calls to Perl::Critic::Policy::violation, avg 28µs/call |
| 46 | } | ||||
| 47 | |||||
| 48 | 1 | 3µs | 1; | ||
| 49 | |||||
| 50 | __END__ |