← 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/ProhibitJoinedReadline.pm
StatementsExecuted 20 statements in 619µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11121µs21µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@10Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@10
11111µs188µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@14Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@14
11110µs559µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@16Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@16
11110µs25µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@11Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@11
11110µs76µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@17Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@17
11110µs15µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@12Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@12
1119µs43µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::BEGIN@13Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@13
1119µs11µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::default_severityPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::default_severity
1112µs2µsPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::supported_parametersPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::supported_parameters
0000s0sPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::__ANON__[:43]Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::__ANON__[:43]
0000s0sPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::applies_toPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::applies_to
0000s0sPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::default_themesPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::default_themes
0000s0sPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::::violatesPerl::Critic::Policy::InputOutput::ProhibitJoinedReadline::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::ProhibitJoinedReadline;
9
10253µs121µ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
use 5.006001;
11227µs241µ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
use strict;
# spent 25µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@11 # spent 16µs making 1 call to strict::import
12224µs220µ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
use warnings;
# spent 15µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@12 # spent 5µs making 1 call to warnings::import
13234µs277µ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
use Readonly;
# spent 43µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@13 # spent 34µs making 1 call to Exporter::import
142173µs2364µ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
use List::MoreUtils qw(any);
# 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
16232µs21.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
use Perl::Critic::Utils qw{ :severities :classification parse_arg_list };
# spent 559µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@16 # spent 549µs making 1 call to Exporter::import
172259µs2143µ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
use base 'Perl::Critic::Policy';
# spent 76µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline::BEGIN@17 # spent 67µs making 1 call to base::import
18
191700nsour $VERSION = '1.121';
20
21#-----------------------------------------------------------------------------
22
2312µs140µsReadonly::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
2412µs158µsReadonly::Scalar my $EXPL => [213];
# spent 58µs making 1 call to Readonly::Scalar
25
26#-----------------------------------------------------------------------------
27
2815µ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
sub supported_parameters { return () }
2912µ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
sub default_severity { return $SEVERITY_MEDIUM }
30sub default_themes { return qw( core pbp performance ) }
31sub applies_to { return 'PPI::Token::Word' }
32
33#-----------------------------------------------------------------------------
34
35sub 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
5114µs1;
52
53__END__