← 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:11 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Exception/AggregateConfiguration.pm
StatementsExecuted 3044 statements in 4.30ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
424432.19ms258msPerl::Critic::Exception::AggregateConfiguration::::newPerl::Critic::Exception::AggregateConfiguration::new
425531.51ms2.01msPerl::Critic::Exception::AggregateConfiguration::::has_exceptionsPerl::Critic::Exception::AggregateConfiguration::has_exceptions
23822305┬Ás305┬ÁsPerl::Critic::Exception::AggregateConfiguration::::add_exception_or_rethrowPerl::Critic::Exception::AggregateConfiguration::add_exception_or_rethrow
11118┬Ás18┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@10Perl::Critic::Exception::AggregateConfiguration::BEGIN@10
11111┬Ás29┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@16Perl::Critic::Exception::AggregateConfiguration::BEGIN@16
11110┬Ás14┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@12Perl::Critic::Exception::AggregateConfiguration::BEGIN@12
11110┬Ás20┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@11Perl::Critic::Exception::AggregateConfiguration::BEGIN@11
1119┬Ás211┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@24Perl::Critic::Exception::AggregateConfiguration::BEGIN@24
1118┬Ás254┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@18Perl::Critic::Exception::AggregateConfiguration::BEGIN@18
1117┬Ás28┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@14Perl::Critic::Exception::AggregateConfiguration::BEGIN@14
1116┬Ás365┬ÁsPerl::Critic::Exception::AggregateConfiguration::::BEGIN@15Perl::Critic::Exception::AggregateConfiguration::BEGIN@15
0000s0sPerl::Critic::Exception::AggregateConfiguration::::add_exceptionPerl::Critic::Exception::AggregateConfiguration::add_exception
0000s0sPerl::Critic::Exception::AggregateConfiguration::::add_exceptions_fromPerl::Critic::Exception::AggregateConfiguration::add_exceptions_from
0000s0sPerl::Critic::Exception::AggregateConfiguration::::full_messagePerl::Critic::Exception::AggregateConfiguration::full_message
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::Exception::AggregateConfiguration;
9
10239┬Ás118┬Ás
# spent 18┬Ás within Perl::Critic::Exception::AggregateConfiguration::BEGIN@10 which was called: # once (18┬Ás+0s) by Perl::Critic::Config::BEGIN@20 at line 10
use 5.006001;
11220┬Ás231┬Ás
# spent 20┬Ás (10+10) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@11 which was called: # once (10┬Ás+10┬Ás) by Perl::Critic::Config::BEGIN@20 at line 11
use strict;
# spent 20┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@11 # spent 10┬Ás making 1 call to strict::import
12219┬Ás217┬Ás
# spent 14┬Ás (10+4) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@12 which was called: # once (10┬Ás+4┬Ás) by Perl::Critic::Config::BEGIN@20 at line 12
use warnings;
# spent 14┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@12 # spent 4┬Ás making 1 call to warnings::import
13
14220┬Ás249┬Ás
# spent 28┬Ás (7+21) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@14 which was called: # once (7┬Ás+21┬Ás) by Perl::Critic::Config::BEGIN@20 at line 14
use Carp qw{ confess };
# spent 28┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@14 # spent 21┬Ás making 1 call to Exporter::import
15221┬Ás2723┬Ás
# spent 365┬Ás (6+358) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@15 which was called: # once (6┬Ás+358┬Ás) by Perl::Critic::Config::BEGIN@20 at line 15
use English qw(-no_match_vars);
# spent 365┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@15 # spent 358┬Ás making 1 call to English::import
16221┬Ás247┬Ás
# spent 29┬Ás (11+18) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@16 which was called: # once (11┬Ás+18┬Ás) by Perl::Critic::Config::BEGIN@20 at line 16
use Readonly;
# spent 29┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@16 # spent 18┬Ás making 1 call to Exporter::import
17
18244┬Ás2500┬Ás
# spent 254┬Ás (8+246) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@18 which was called: # once (8┬Ás+246┬Ás) by Perl::Critic::Config::BEGIN@20 at line 18
use Perl::Critic::Utils qw{ :characters };
# spent 254┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@18 # spent 246┬Ás making 1 call to Exporter::import
19
201300nsour $VERSION = '1.121';
21
22#-----------------------------------------------------------------------------
23
24
# spent 211┬Ás (9+202) within Perl::Critic::Exception::AggregateConfiguration::BEGIN@24 which was called: # once (9┬Ás+202┬Ás) by Perl::Critic::Config::BEGIN@20 at line 31
use Exception::Class (
251300ns 'Perl::Critic::Exception::AggregateConfiguration' => {
26 isa => 'Perl::Critic::Exception',
27 description => 'A collected set of configuration exceptions.',
28 fields => [ qw{ exceptions } ],
29 alias => 'throw_aggregate',
30 },
311280┬Ás2413┬Ás);
# spent 211┬Ás making 1 call to Perl::Critic::Exception::AggregateConfiguration::BEGIN@24 # spent 202┬Ás making 1 call to Exception::Class::import
32
33#-----------------------------------------------------------------------------
34
3512┬Ás126┬ÁsReadonly::Array our @EXPORT_OK => qw< throw_aggregate >;
# spent 26┬Ás making 1 call to Readonly::Array
36
37#-----------------------------------------------------------------------------
38
39
# spent 258ms (2.19+255) within Perl::Critic::Exception::AggregateConfiguration::new which was called 424 times, avg 608┬Ás/call: # 141 times (700┬Ás+89.8ms) by Perl::Critic::PolicyConfig::handle_extra_parameters at line 170 of Perl/Critic/PolicyConfig.pm, avg 642┬Ás/call # 141 times (738┬Ás+86.2ms) by Perl::Critic::Policy::new at line 94 of Perl/Critic/Policy.pm, avg 617┬Ás/call # 141 times (739┬Ás+78.9ms) by Perl::Critic::Policy::__set_base_parameters at line 159 of Perl/Critic/Policy.pm, avg 565┬Ás/call # once (15┬Ás+586┬Ás) by Perl::Critic::Config::_init at line 66 of Perl/Critic/Config.pm
sub new {
40424177┬Ás my ($class, %options) = @_;
41
42424106┬Ás my $exceptions = $options{exceptions};
43424240┬Ás if (not $exceptions) {
44 $options{exceptions} = [];
45 }
46
474241.59ms424255ms return $class->SUPER::new(%options);
# spent 255ms making 424 calls to Exception::Class::Base::new, avg 602┬Ás/call
48}
49
50#-----------------------------------------------------------------------------
51
52sub add_exception {
53 my ( $self, $exception ) = @_;
54
55 push @{ $self->exceptions() }, $exception;
56
57 return;
58}
59
60#-----------------------------------------------------------------------------
61
62sub add_exceptions_from {
63 my ( $self, $aggregate ) = @_;
64
65 push @{ $self->exceptions() }, @{ $aggregate->exceptions() };
66
67 return;
68}
69
70#-----------------------------------------------------------------------------
71
72
# spent 305┬Ás within Perl::Critic::Exception::AggregateConfiguration::add_exception_or_rethrow which was called 238 times, avg 1┬Ás/call: # 141 times (186┬Ás+0s) by Perl::Critic::PolicyFactory::create_all_policies at line 222 of Perl/Critic/PolicyFactory.pm, avg 1┬Ás/call # 97 times (119┬Ás+0s) by Perl::Critic::Policy::new at line 100 of Perl/Critic/Policy.pm, avg 1┬Ás/call
sub add_exception_or_rethrow {
7323853┬Ás my ( $self, $eval_error ) = @_;
74
75238453┬Ás return if not $eval_error;
76 confess $eval_error if not ref $eval_error;
77
78 if ( $eval_error->isa('Perl::Critic::Exception::Configuration') ) {
79 $self->add_exception($eval_error);
80 }
81 elsif (
82 $eval_error->isa('Perl::Critic::Exception::AggregateConfiguration')
83 ) {
84 $self->add_exceptions_from($eval_error);
85 }
86 else {
87 die $eval_error; ## no critic (RequireCarping)
88 }
89
90 return;
91}
92
93#-----------------------------------------------------------------------------
94
95
# spent 2.01ms (1.51+493┬Ás) within Perl::Critic::Exception::AggregateConfiguration::has_exceptions which was called 425 times, avg 5┬Ás/call: # 141 times (528┬Ás+152┬Ás) by Perl::Critic::Policy::new at line 110 of Perl/Critic/Policy.pm, avg 5┬Ás/call # 141 times (499┬Ás+174┬Ás) by Perl::Critic::PolicyConfig::handle_extra_parameters at line 183 of Perl/Critic/PolicyConfig.pm, avg 5┬Ás/call # 141 times (476┬Ás+164┬Ás) by Perl::Critic::Policy::__set_base_parameters at line 181 of Perl/Critic/Policy.pm, avg 5┬Ás/call # once (5┬Ás+2┬Ás) by Perl::Critic::Config::_init at line 155 of Perl/Critic/Config.pm # once (4┬Ás+1┬Ás) by Perl::Critic::Config::_load_policies at line 221 of Perl/Critic/Config.pm
sub has_exceptions {
9642577┬Ás my ( $self ) = @_;
97
984251.12ms425493┬Ás return @{ $self->exceptions() } ? 1 : 0;
# spent 493┬Ás making 425 calls to Perl::Critic::Exception::AggregateConfiguration::exceptions, avg 1┬Ás/call
99}
100
101#-----------------------------------------------------------------------------
102
10311┬Ás134┬ÁsReadonly::Scalar my $MESSAGE_PREFIX => $EMPTY;
# spent 34┬Ás making 1 call to Readonly::Scalar
1041900ns120┬ÁsReadonly::Scalar my $MESSAGE_SUFFIX => "\n";
# spent 20┬Ás making 1 call to Readonly::Scalar
10514┬Ás323┬ÁsReadonly::Scalar my $MESSAGE_SEPARATOR => $MESSAGE_SUFFIX . $MESSAGE_PREFIX;
# spent 21┬Ás making 1 call to Readonly::Scalar # spent 2┬Ás making 2 calls to Readonly::Scalar::FETCH, avg 1┬Ás/call
106
107sub full_message {
108 my ( $self ) = @_;
109
110 my $message = $MESSAGE_PREFIX;
111 $message .= join $MESSAGE_SEPARATOR, @{ $self->exceptions() };
112 $message .= $MESSAGE_SUFFIX;
113
114 return $message;
115}
116
11714┬Ás1;
118
119#-----------------------------------------------------------------------------
120
121__END__