← 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/ProhibitBarewordFileHandles.pm
StatementsExecuted 27164 statements in 58.3ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
134811149.1ms322msPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::violatesPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::violates
14411298µs298µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::applies_toPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::applies_to
11126µs26µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::BEGIN@10Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@10
11116µs24µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::BEGIN@12Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@12
11115µs95µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::BEGIN@11Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@11
11112µs53µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::BEGIN@13Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@13
11112µs96µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::BEGIN@16Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@16
11111µs691µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::BEGIN@15Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@15
1119µs11µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::default_severityPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::default_severity
1112µs2µsPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::supported_parametersPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::supported_parameters
0000s0sPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::::default_themesPerl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::default_themes
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::ProhibitBarewordFileHandles;
9
10268µs126µs
# spent 26µs within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@10 which was called: # once (26µs+0s) by Module::Pluggable::Object::_require at line 10
use 5.006001;
11255µs2175µs
# spent 95µs (15+80) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@11 which was called: # once (15µs+80µs) by Module::Pluggable::Object::_require at line 11
use strict;
# spent 95µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@11 # spent 80µs making 1 call to strict::import
12234µs231µs
# spent 24µs (16+8) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@12 which was called: # once (16µs+8µs) by Module::Pluggable::Object::_require at line 12
use warnings;
# spent 24µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@12 # spent 8µs making 1 call to warnings::import
13240µs293µs
# spent 53µs (12+40) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@13 which was called: # once (12µs+40µs) by Module::Pluggable::Object::_require at line 13
use Readonly;
# spent 53µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@13 # spent 40µs making 1 call to Exporter::import
14
15240µs21.37ms
# spent 691µs (11+680) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@15 which was called: # once (11µs+680µs) by Module::Pluggable::Object::_require at line 15
use Perl::Critic::Utils qw{ :severities :classification :ppi };
# spent 691µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@15 # spent 680µs making 1 call to Exporter::import
162308µs2180µs
# spent 96µs (12+84) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@16 which was called: # once (12µs+84µs) by Module::Pluggable::Object::_require at line 16
use base 'Perl::Critic::Policy';
# spent 96µs making 1 call to Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::BEGIN@16 # spent 84µs making 1 call to base::import
17
1811µsour $VERSION = '1.121';
19
20#-----------------------------------------------------------------------------
21
2213µs148µsReadonly::Scalar my $DESC => q{Bareword file handle opened};
# spent 48µs making 1 call to Readonly::Scalar
2313µs173µsReadonly::Scalar my $EXPL => [ 202, 204 ];
# spent 73µs making 1 call to Readonly::Scalar
24
25#-----------------------------------------------------------------------------
26
2716µs
# spent 2µs within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::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 () }
2812µs
# spent 11µs (9+2) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::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_HIGHEST }
29sub default_themes { return qw( core pbp bugs certrec ) }
30144412µs
# spent 298µs within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::applies_to which was called 144 times, avg 2µs/call: # 144 times (298µs+0s) by Perl::Critic::_critique at line 165 of Perl/Critic.pm, avg 2µs/call
sub applies_to { return 'PPI::Token::Word' }
31
32#-----------------------------------------------------------------------------
33
34
# spent 322ms (49.1+273) within Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles::violates which was called 13481 times, avg 24µs/call: # 13481 times (49.1ms+273ms) by Perl::Critic::_critique at line 183 of Perl/Critic.pm, avg 24µs/call
sub violates {
35134813.01ms my ($self, $elem, undef) = @_;
36
371348154.3ms13481269ms return if $elem ne 'open';
# spent 269ms making 13481 calls to PPI::Element::__ne, avg 20µs/call
38613µs62.04ms return if ! is_function_call($elem);
# spent 2.04ms making 6 calls to Perl::Critic::Utils::is_function_call, avg 340µs/call
39
40514µs52.46ms my $first_arg = ( parse_arg_list($elem) )[0];
# spent 2.46ms making 5 calls to Perl::Critic::Utils::parse_arg_list, avg 492µs/call
4151µs return if !$first_arg;
4252µs my $first_token = $first_arg->[0];
43516µs53µs return if !$first_token;
# spent 3µs making 5 calls to PPI::Util::TRUE, avg 680ns/call
44
45519µs54µs if ( $first_token->isa('PPI::Token::Word') ) {
# spent 4µs making 5 calls to UNIVERSAL::isa, avg 880ns/call
4645µs464µs if ( ($first_token ne 'my') && ($first_token !~ m/^STD(?:IN|OUT|ERR)$/xms ) ) {
# spent 64µs making 4 calls to PPI::Element::__ne, avg 16µs/call
47 return $self->violation( $DESC, $EXPL, $elem );
48 }
49 }
50512µs return; #ok!
51}
52
5316µs1;
54
55__END__