Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/InputOutput/ProhibitOneArgSelect.pm |
Statements | Executed 18 statements in 395µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 22µs | 22µs | BEGIN@10 | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 10µs | 578µs | BEGIN@15 | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 10µs | 16µs | BEGIN@12 | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 10µs | 39µs | BEGIN@13 | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 10µs | 86µs | BEGIN@16 | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 10µs | 25µs | BEGIN@11 | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 8µs | 9µs | default_severity | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
1 | 1 | 1 | 2µs | 2µs | supported_parameters | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
0 | 0 | 0 | 0s | 0s | applies_to | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
0 | 0 | 0 | 0s | 0s | default_themes | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
0 | 0 | 0 | 0s | 0s | violates | Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::
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::InputOutput::ProhibitOneArgSelect; | ||||
9 | |||||
10 | 2 | 53µs | 1 | 22µs | # spent 22µs within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@10 which was called:
# once (22µs+0s) by Module::Pluggable::Object::_require at line 10 # spent 22µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@10 |
11 | 2 | 33µs | 2 | 41µs | # spent 25µs (10+16) within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@11 which was called:
# once (10µs+16µs) by Module::Pluggable::Object::_require at line 11 # spent 25µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@11
# spent 16µs making 1 call to strict::import |
12 | 2 | 26µs | 2 | 21µs | # spent 16µs (10+5) within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@12 which was called:
# once (10µs+5µs) by Module::Pluggable::Object::_require at line 12 # spent 16µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@12
# spent 5µs making 1 call to warnings::import |
13 | 2 | 32µs | 2 | 67µs | # spent 39µs (10+28) within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@13 which was called:
# once (10µs+28µs) by Module::Pluggable::Object::_require at line 13 # spent 39µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@13
# spent 28µs making 1 call to Exporter::import |
14 | |||||
15 | 2 | 33µs | 2 | 1.15ms | # spent 578µs (10+568) within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@15 which was called:
# once (10µs+568µs) by Module::Pluggable::Object::_require at line 15 # spent 578µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@15
# spent 568µs making 1 call to Exporter::import |
16 | 2 | 202µs | 2 | 161µs | # spent 86µs (10+75) within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@16 which was called:
# once (10µs+75µs) by Module::Pluggable::Object::_require at line 16 # spent 86µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::BEGIN@16
# spent 75µs making 1 call to base::import |
17 | |||||
18 | 1 | 700ns | our $VERSION = '1.121'; | ||
19 | |||||
20 | #----------------------------------------------------------------------------- | ||||
21 | |||||
22 | 1 | 2µs | 1 | 39µs | Readonly::Scalar my $DESC => q{One-argument "select" used}; # spent 39µs making 1 call to Readonly::Scalar |
23 | 1 | 2µs | 1 | 58µs | Readonly::Scalar my $EXPL => [ 224 ]; # spent 58µs making 1 call to Readonly::Scalar |
24 | |||||
25 | #----------------------------------------------------------------------------- | ||||
26 | |||||
27 | 1 | 5µs | # spent 2µs within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::supported_parameters which was called:
# once (2µs+0s) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm | ||
28 | 1 | 2µs | # spent 9µs (8+2) within Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect::default_severity which was called:
# once (8µs+2µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm | ||
29 | sub default_themes { return qw( core bugs pbp certrule ) } | ||||
30 | sub applies_to { return 'PPI::Token::Word' } | ||||
31 | |||||
32 | #----------------------------------------------------------------------------- | ||||
33 | |||||
34 | sub violates { | ||||
35 | my ($self, $elem, undef) = @_; | ||||
36 | |||||
37 | return if $elem ne 'select'; | ||||
38 | return if ! is_function_call($elem); | ||||
39 | |||||
40 | my @arguments = parse_arg_list($elem); | ||||
41 | if( 1 == @arguments ) { | ||||
42 | return $self->violation( $DESC, $EXPL, $elem ); | ||||
43 | } | ||||
44 | return; #ok! | ||||
45 | } | ||||
46 | |||||
47 | 1 | 4µs | 1; | ||
48 | |||||
49 | __END__ |