← Index
NYTProf Performance Profile   « block view • line view • sub view »
For t/app_dpath.t
  Run on Tue Jun 5 15:25:28 2012
Reported on Tue Jun 5 15:26:05 2012

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/English.pm
StatementsExecuted 76 statements in 3.96ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1113.80ms4.96msEnglish::::BEGIN@187English::BEGIN@187
111507µs1.46msEnglish::::BEGIN@148English::BEGIN@148
11182µs1.95msEnglish::::importEnglish::import
11151µs97µsEnglish::::BEGIN@47English::BEGIN@47
11117µs17µsEnglish::::CORE:matchEnglish::CORE:match (opcode)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package English;
2
314µsour $VERSION = '1.04';
4
512µsrequire Exporter;
6121µs@ISA = qw(Exporter);
7
8=head1 NAME
9
10English - use nice English (or awk) names for ugly punctuation variables
11
12=head1 SYNOPSIS
13
14 use English qw( -no_match_vars ) ; # Avoids regex performance penalty
15 use English;
16 ...
17 if ($ERRNO =~ /denied/) { ... }
18
19=head1 DESCRIPTION
20
21This module provides aliases for the built-in variables whose
22names no one seems to like to read. Variables with side-effects
23which get triggered just by accessing them (like $0) will still
24be affected.
25
26For those variables that have an B<awk> version, both long
27and short English alternatives are provided. For example,
28the C<$/> variable can be referred to either $RS or
29$INPUT_RECORD_SEPARATOR if you are using the English module.
30
31See L<perlvar> for a complete list of these.
32
33=head1 PERFORMANCE
34
35This module can provoke sizeable inefficiencies for regular expressions,
36due to unfortunate implementation details. If performance matters in
37your application and you don't need $PREMATCH, $MATCH, or $POSTMATCH,
38try doing
39
40 use English qw( -no_match_vars ) ;
41
42. B<It is especially important to do this in modules to avoid penalizing
43all applications which use them.>
44
45=cut
46
4721.19ms2143µs
# spent 97µs (51+46) within English::BEGIN@47 which was called: # once (51µs+46µs) by Config::General::BEGIN@17 at line 47
no warnings;
# spent 97µs making 1 call to English::BEGIN@47 # spent 46µs making 1 call to warnings::unimport
48
4911µsmy $globbed_match ;
50
51# Grandfather $NAME import
52
# spent 1.95ms (82µs+1.86) within English::import which was called: # once (82µs+1.86ms) by Config::General::BEGIN@17 at line 17 of Config/General.pm
sub import {
53541µs my $this = shift;
54143µs117µs my @list = grep { ! /^-no_match_vars$/ } @_ ;
# spent 17µs making 1 call to English::CORE:match
55 local $Exporter::ExportLevel = 1;
5614µs if ( @_ == @list ) {
57 *EXPORT = \@COMPLETE_EXPORT ;
58 $globbed_match ||= (
59 eval q{
60 *MATCH = *& ;
61 *PREMATCH = *` ;
62 *POSTMATCH = *' ;
63 1 ;
64 }
65 || do {
66 require Carp ;
67 Carp::croak("Can't create English for match leftovers: $@") ;
68 }
69 ) ;
70 }
71 else {
72 *EXPORT = \@MINIMAL_EXPORT ;
73 }
7411.85ms Exporter::import($this,grep {s/^\$/*/} @list);
# spent 1.85ms making 1 call to Exporter::import
75}
76
77134µs@MINIMAL_EXPORT = qw(
78 *ARG
79 *LAST_PAREN_MATCH
80 *INPUT_LINE_NUMBER
81 *NR
82 *INPUT_RECORD_SEPARATOR
83 *RS
84 *OUTPUT_AUTOFLUSH
85 *OUTPUT_FIELD_SEPARATOR
86 *OFS
87 *OUTPUT_RECORD_SEPARATOR
88 *ORS
89 *LIST_SEPARATOR
90 *SUBSCRIPT_SEPARATOR
91 *SUBSEP
92 *FORMAT_PAGE_NUMBER
93 *FORMAT_LINES_PER_PAGE
94 *FORMAT_LINES_LEFT
95 *FORMAT_NAME
96 *FORMAT_TOP_NAME
97 *FORMAT_LINE_BREAK_CHARACTERS
98 *FORMAT_FORMFEED
99 *CHILD_ERROR
100 *OS_ERROR
101 *ERRNO
102 *EXTENDED_OS_ERROR
103 *EVAL_ERROR
104 *PROCESS_ID
105 *PID
106 *REAL_USER_ID
107 *UID
108 *EFFECTIVE_USER_ID
109 *EUID
110 *REAL_GROUP_ID
111 *GID
112 *EFFECTIVE_GROUP_ID
113 *EGID
114 *PROGRAM_NAME
115 *PERL_VERSION
116 *ACCUMULATOR
117 *COMPILING
118 *DEBUGGING
119 *SYSTEM_FD_MAX
120 *INPLACE_EDIT
121 *PERLDB
122 *BASETIME
123 *WARNING
124 *EXECUTABLE_NAME
125 *OSNAME
126 *LAST_REGEXP_CODE_RESULT
127 *EXCEPTIONS_BEING_CAUGHT
128 *LAST_SUBMATCH_RESULT
129 @LAST_MATCH_START
130 @LAST_MATCH_END
131);
132
133
13414µs@MATCH_EXPORT = qw(
135 *MATCH
136 *PREMATCH
137 *POSTMATCH
138);
139
140131µs@COMPLETE_EXPORT = ( @MINIMAL_EXPORT, @MATCH_EXPORT ) ;
141
142# The ground of all being. @ARG is deprecated (5.005 makes @_ lexical)
143
14413µs *ARG = *_ ;
145
146# Matching.
147
14831.10ms11.46ms
# spent 1.46ms (507µs+951µs) within English::BEGIN@148 which was called: # once (507µs+951µs) by Config::General::BEGIN@17 at line 148
*LAST_PAREN_MATCH = *+ ;
# spent 1.46ms making 1 call to English::BEGIN@148
14911µs *LAST_SUBMATCH_RESULT = *^N ;
15015µs *LAST_MATCH_START = *-{ARRAY} ;
15112µs *LAST_MATCH_END = *+{ARRAY} ;
152
153# Input.
154
15512µs *INPUT_LINE_NUMBER = *. ;
15612µs *NR = *. ;
15711µs *INPUT_RECORD_SEPARATOR = */ ;
15812µs *RS = */ ;
159
160# Output.
161
16212µs *OUTPUT_AUTOFLUSH = *| ;
16311µs *OUTPUT_FIELD_SEPARATOR = *, ;
16412µs *OFS = *, ;
16511µs *OUTPUT_RECORD_SEPARATOR = *\ ;
16612µs *ORS = *\ ;
167
168# Interpolation "constants".
169
17011µs *LIST_SEPARATOR = *" ;
17111µs *SUBSCRIPT_SEPARATOR = *; ;
17211µs *SUBSEP = *; ;
173
174# Formats
175
17611µs *FORMAT_PAGE_NUMBER = *% ;
17711µs *FORMAT_LINES_PER_PAGE = *= ;
17811µs *FORMAT_LINES_LEFT = *- ;
17911µs *FORMAT_NAME = *~ ;
18011µs *FORMAT_TOP_NAME = *^ ;
18111µs *FORMAT_LINE_BREAK_CHARACTERS = *: ;
18211µs *FORMAT_FORMFEED = *^L ;
183
184# Error status.
185
18611µs *CHILD_ERROR = *? ;
18731.30ms14.96ms
# spent 4.96ms (3.80+1.16) within English::BEGIN@187 which was called: # once (3.80ms+1.16ms) by Config::General::BEGIN@17 at line 187
*OS_ERROR = *! ;
# spent 4.96ms making 1 call to English::BEGIN@187
18811µs *ERRNO = *! ;
18911µs *OS_ERROR = *! ;
1901900ns *ERRNO = *! ;
19111µs *EXTENDED_OS_ERROR = *^E ;
19211µs *EVAL_ERROR = *@ ;
193
194# Process info.
195
19611µs *PROCESS_ID = *$ ;
19711µs *PID = *$ ;
19811µs *REAL_USER_ID = *< ;
19911µs *UID = *< ;
20011µs *EFFECTIVE_USER_ID = *> ;
20111µs *EUID = *> ;
20211µs *REAL_GROUP_ID = *( ;
20311µs *GID = *( ;
20411µs *EFFECTIVE_GROUP_ID = *) ;
20511µs *EGID = *) ;
20611µs *PROGRAM_NAME = *0 ;
207
208# Internals.
209
21011µs *PERL_VERSION = *^V ;
21111µs *ACCUMULATOR = *^A ;
21211µs *COMPILING = *^C ;
21311µs *DEBUGGING = *^D ;
21411µs *SYSTEM_FD_MAX = *^F ;
21511µs *INPLACE_EDIT = *^I ;
21611µs *PERLDB = *^P ;
21711µs *LAST_REGEXP_CODE_RESULT = *^R ;
21811µs *EXCEPTIONS_BEING_CAUGHT = *^S ;
21911µs *BASETIME = *^T ;
22011µs *WARNING = *^W ;
22111µs *EXECUTABLE_NAME = *^X ;
22211µs *OSNAME = *^O ;
223
224# Deprecated.
225
226# *ARRAY_BASE = *[ ;
227# *OFMT = *# ;
228# *OLD_PERL_VERSION = *] ;
229
2301107µs1;
 
# spent 17µs within English::CORE:match which was called: # once (17µs+0s) by English::import at line 54
sub English::CORE:match; # opcode