← 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__