← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:35 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Moose/Error/Util.pm
StatementsExecuted 10 statements in 200µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111µs13µsMoose::Error::Util::::BEGIN@4Moose::Error::Util::BEGIN@4
1116µs18µsMoose::Error::Util::::BEGIN@5Moose::Error::Util::BEGIN@5
1114µs4µsMoose::Error::Util::::BEGIN@10Moose::Error::Util::BEGIN@10
0000s0sMoose::Error::Util::::_create_error_carpmessMoose::Error::Util::_create_error_carpmess
0000s0sMoose::Error::Util::::create_errorMoose::Error::Util::create_error
0000s0sMoose::Error::Util::::create_error_confessMoose::Error::Util::create_error_confess
0000s0sMoose::Error::Util::::create_error_croakMoose::Error::Util::create_error_croak
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package # pretend this doesn't exist, because it shouldn't
2 Moose::Error::Util;
3
4316µs215µs
# spent 13µs (11+2) within Moose::Error::Util::BEGIN@4 which was called: # once (11µs+2µs) by Moose::Error::Default::BEGIN@15 at line 4
use strict;
# spent 13µs making 1 call to Moose::Error::Util::BEGIN@4 # spent 2µs making 1 call to strict::import
5320µs229µs
# spent 18µs (6+11) within Moose::Error::Util::BEGIN@5 which was called: # once (6µs+11µs) by Moose::Error::Default::BEGIN@15 at line 5
use warnings;
# spent 18µs making 1 call to Moose::Error::Util::BEGIN@5 # spent 11µs making 1 call to warnings::import
6
7# this intentionally exists to have a place to put this logic that doesn't
8# involve loading Class::MOP, so... don't do that
9
103163µs14µs
# spent 4µs within Moose::Error::Util::BEGIN@10 which was called: # once (4µs+0s) by Moose::Error::Default::BEGIN@15 at line 10
use Carp::Heavy;
# spent 4µs making 1 call to Moose::Error::Util::BEGIN@10
11
12sub _create_error_carpmess {
13 my %args = @_;
14
15 my $carp_level = 3 + ( $args{depth} || 0 );
16 local $Carp::MaxArgNums = 20; # default is 8, usually we use named args which gets messier though
17
18 my @args = exists $args{message} ? $args{message} : ();
19
20 if ( $args{longmess} || $Carp::Verbose ) {
21 local $Carp::CarpLevel = ( $Carp::CarpLevel || 0 ) + $carp_level;
22 return Carp::longmess(@args);
23 } else {
24 return Carp::ret_summary($carp_level, @args);
25 }
26}
27
28sub create_error_croak {
29 _create_error_carpmess(@_);
30}
31
32sub create_error_confess {
33 _create_error_carpmess(@_, longmess => 1);
34}
35
36sub create_error {
37 if (defined $ENV{MOOSE_ERROR_STYLE} && $ENV{MOOSE_ERROR_STYLE} eq 'croak') {
38 create_error_croak(@_);
39 }
40 else {
41 create_error_confess(@_);
42 }
43}
44
4512µs1;
46
47__END__