← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:13:08 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/Carp.pm
StatementsExecuted 12 statements in 2.22ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sCarp::::carpCarp::carp
0000s0sCarp::::cluckCarp::cluck
0000s0sCarp::::confessCarp::confess
0000s0sCarp::::croakCarp::croak
0000s0sCarp::::export_failCarp::export_fail
0000s0sCarp::::longmessCarp::longmess
0000s0sCarp::::longmess_jmpCarp::longmess_jmp
0000s0sCarp::::shortmessCarp::shortmess
0000s0sCarp::::shortmess_jmpCarp::shortmess_jmp
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Carp;
2
314µsour $VERSION = '1.11';
4# this file is an utra-lightweight stub. The first time a function is
5# called, Carp::Heavy is loaded, and the real short/longmessmess_jmp
6# subs are installed
7
812µsour $MaxEvalLen = 0;
912µsour $Verbose = 0;
1012µsour $CarpLevel = 0;
1112µsour $MaxArgLen = 64; # How much of each argument to print. 0 = all.
1212µsour $MaxArgNums = 8; # How many arguments to print. 0 = all.
13
1412.13msrequire Exporter;
15143µsour @ISA = ('Exporter');
1616µsour @EXPORT = qw(confess croak carp);
1716µsour @EXPORT_OK = qw(cluck verbose longmess shortmess);
1814µsour @EXPORT_FAIL = qw(verbose); # hook to enable verbose mode
19
20# if the caller specifies verbose usage ("perl -MCarp=verbose script.pl")
21# then the following method will be called by the Exporter which knows
22# to do this thanks to @EXPORT_FAIL, above. $_[1] will contain the word
23# 'verbose'.
24
25sub export_fail { shift; $Verbose = shift if $_[0] eq 'verbose'; @_ }
26
27# fixed hooks for stashes to point to
28sub longmess { goto &longmess_jmp }
29sub shortmess { goto &shortmess_jmp }
30# these two are replaced when Carp::Heavy is loaded
31sub longmess_jmp {
32 local($@, $!);
33 eval { require Carp::Heavy };
34 return $@ if $@;
35 goto &longmess_real;
36}
37sub shortmess_jmp {
38 local($@, $!);
39 eval { require Carp::Heavy };
40 return $@ if $@;
41 goto &shortmess_real;
42}
43
44sub croak { die shortmess @_ }
45sub confess { die longmess @_ }
46sub carp { warn shortmess @_ }
47sub cluck { warn longmess @_ }
48
49126µs1;
50__END__