← 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/InputOutput/ProhibitBacktickOperators.pm
StatementsExecuted 20 statements in 505µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11126µs26µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::BEGIN@10Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@10
11112µs277µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::BEGIN@15Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@15
11112µs46µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::BEGIN@13Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@13
11112µs100µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::BEGIN@17Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@17
11111µs17µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::BEGIN@12Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@12
11111µs30µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::BEGIN@11Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@11
1118µs10µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::default_severityPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::default_severity
1115µs5µsPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::supported_parametersPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::supported_parameters
0000s0sPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::applies_toPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::applies_to
0000s0sPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::default_themesPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::default_themes
0000s0sPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::::violatesPerl::Critic::Policy::InputOutput::ProhibitBacktickOperators::violates
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::InputOutput::ProhibitBacktickOperators;
9
10266µs126µs
# spent 26µs within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@10 which was called: # once (26µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11232µs250µs
# spent 30µs (11+19) within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@11 which was called: # once (11µs+19µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 30µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@11 # spent 19µs making 1 call to strict::import
12230µs223µs
# spent 17µs (11+6) within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@12 which was called: # once (11µs+6µs) by Module::Pluggable::Object::_require at line 12
use warnings;
# spent 17µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@12 # spent 6µs making 1 call to warnings::import
13244µs281µs
# spent 46µs (12+35) within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@13 which was called: # once (12µs+35µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 46µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@13 # spent 35µs making 1 call to Exporter::import
14
15240µs2541µs
# spent 277µs (12+265) within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@15 which was called: # once (12µs+265µs) by Module::Pluggable::Object::_require at line 15
use Perl::Critic::Utils qw{ :severities is_in_void_context };
# spent 277µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@15 # spent 265µs making 1 call to Exporter::import
16
172269µs2188µs
# spent 100µs (12+88) within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@17 which was called: # once (12µs+88µs) by Module::Pluggable::Object::_require at line 17
use base 'Perl::Critic::Policy';
# spent 100µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::BEGIN@17 # spent 88µs making 1 call to base::import
18
191900nsour $VERSION = '1.121';
20
21#-----------------------------------------------------------------------------
22
2313µs147µsReadonly::Scalar my $EXPL => q{Use IPC::Open3 instead};
# spent 47µs making 1 call to Readonly::Scalar
2412µs134µsReadonly::Scalar my $DESC => q{Backtick operator used};
# spent 34µs making 1 call to Readonly::Scalar
25
2612µs132µsReadonly::Scalar my $VOID_EXPL => q{Assign result to a variable or use system() instead};
# spent 32µs making 1 call to Readonly::Scalar
2712µs132µsReadonly::Scalar my $VOID_DESC => q{Backtick operator used in void context};
# spent 32µs making 1 call to Readonly::Scalar
28
29#-----------------------------------------------------------------------------
30
31
# spent 5µs within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::supported_parameters which was called: # once (5µs+0s) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm
sub supported_parameters {
32 return (
33 {
3417µs name => 'only_in_void_context',
35 description => 'Allow backticks everywhere except in void contexts.',
36 behavior => 'boolean',
37 },
38 );
39}
40
4112µs
# spent 10µs (8+2) within Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators::default_severity which was called: # once (8µs+2µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm
sub default_severity { return $SEVERITY_MEDIUM }
42sub default_themes { return qw(core maintenance) }
43sub applies_to { return qw(PPI::Token::QuoteLike::Backtick
44 PPI::Token::QuoteLike::Command ) }
45
46#-----------------------------------------------------------------------------
47
48sub violates {
49 my ( $self, $elem, undef ) = @_;
50
51 if ( $self->{_only_in_void_context} ) {
52 return if not is_in_void_context( $elem );
53
54 return $self->violation( $VOID_DESC, $VOID_EXPL, $elem );
55 }
56
57 return $self->violation( $DESC, $EXPL, $elem );
58}
59
6016µs1;
61
62__END__