Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/InputOutput/ProhibitJoinedReadline.pm |
Statements | Executed 20 statements in 619µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 21µs | 21µs | BEGIN@10 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 11µs | 188µs | BEGIN@14 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 10µs | 559µs | BEGIN@16 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 10µs | 25µs | BEGIN@11 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 10µs | 76µs | BEGIN@17 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 10µs | 15µs | BEGIN@12 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 9µs | 43µs | BEGIN@13 | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 9µs | 11µs | default_severity | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
1 | 1 | 1 | 2µs | 2µs | supported_parameters | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
0 | 0 | 0 | 0s | 0s | __ANON__[:43] | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
0 | 0 | 0 | 0s | 0s | applies_to | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
0 | 0 | 0 | 0s | 0s | default_themes | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
0 | 0 | 0 | 0s | 0s | violates | Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::
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::ProhibitJoinedReadline; | ||||
9 | |||||
10 | 2 | 53µs | 1 | 21µs | # spent 21µs within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@10 which was called:
# once (21µs+0s) by Module::Pluggable::Object::_require at line 10 # spent 21µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@10 |
11 | 2 | 27µs | 2 | 41µs | # spent 25µs (10+16) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::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::ProhibitJoinedReadline::BEGIN@11
# spent 16µs making 1 call to strict::import |
12 | 2 | 24µs | 2 | 20µs | # spent 15µs (10+5) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@12 which was called:
# once (10µs+5µs) by Module::Pluggable::Object::_require at line 12 # spent 15µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@12
# spent 5µs making 1 call to warnings::import |
13 | 2 | 34µs | 2 | 77µs | # spent 43µs (9+34) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@13 which was called:
# once (9µs+34µs) by Module::Pluggable::Object::_require at line 13 # spent 43µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@13
# spent 34µs making 1 call to Exporter::import |
14 | 2 | 173µs | 2 | 364µs | # spent 188µs (11+177) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@14 which was called:
# once (11µs+177µs) by Module::Pluggable::Object::_require at line 14 # spent 188µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@14
# spent 177µs making 1 call to Exporter::Tiny::import |
15 | |||||
16 | 2 | 32µs | 2 | 1.11ms | # spent 559µs (10+549) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@16 which was called:
# once (10µs+549µs) by Module::Pluggable::Object::_require at line 16 # spent 559µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@16
# spent 549µs making 1 call to Exporter::import |
17 | 2 | 259µs | 2 | 143µs | # spent 76µs (10+67) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@17 which was called:
# once (10µs+67µs) by Module::Pluggable::Object::_require at line 17 # spent 76µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@17
# spent 67µs making 1 call to base::import |
18 | |||||
19 | 1 | 700ns | our $VERSION = '1.121'; | ||
20 | |||||
21 | #----------------------------------------------------------------------------- | ||||
22 | |||||
23 | 1 | 2µs | 1 | 40µs | Readonly::Scalar my $DESC => q{Use "local $/ = undef" or File::Slurp instead of joined readline}; ## no critic qw(InterpolationOfMetachars) # spent 40µs making 1 call to Readonly::Scalar |
24 | 1 | 2µs | 1 | 58µs | Readonly::Scalar my $EXPL => [213]; # spent 58µs making 1 call to Readonly::Scalar |
25 | |||||
26 | #----------------------------------------------------------------------------- | ||||
27 | |||||
28 | 1 | 5µs | # spent 2µs within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::supported_parameters which was called:
# once (2µs+0s) by Perl::Critic::Policy::new at line 88 of Perl/Critic/Policy.pm | ||
29 | 1 | 2µs | # spent 11µs (9+2) within Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::default_severity which was called:
# once (9µs+2µs) by Perl::Critic::Policy::get_severity at line 331 of Perl/Critic/Policy.pm | ||
30 | sub default_themes { return qw( core pbp performance ) } | ||||
31 | sub applies_to { return 'PPI::Token::Word' } | ||||
32 | |||||
33 | #----------------------------------------------------------------------------- | ||||
34 | |||||
35 | sub violates { | ||||
36 | my ( $self, $elem, undef ) = @_; | ||||
37 | |||||
38 | return if $elem ne 'join'; | ||||
39 | return if ! is_function_call($elem); | ||||
40 | my @args = parse_arg_list($elem); | ||||
41 | shift @args; # ignore separator string | ||||
42 | |||||
43 | if (any { any { $_->isa('PPI::Token::QuoteLike::Readline') } @{$_} } @args) { | ||||
44 | return $self->violation( $DESC, $EXPL, $elem ); | ||||
45 | } | ||||
46 | |||||
47 | return; # OK | ||||
48 | } | ||||
49 | |||||
50 | |||||
51 | 1 | 4µs | 1; | ||
52 | |||||
53 | __END__ |