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

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2/darwin-2level/Errno.pm
StatementsExecuted 233 statements in 1.21ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111564µs1.35msErrno::::BEGIN@8Errno::BEGIN@8
111118µs118µsErrno::::BEGIN@21Errno::BEGIN@21
1117µs17µsErrno::::BEGIN@9Errno::BEGIN@9
1112µs2µsErrno::::TIEHASHErrno::TIEHASH
0000s0sErrno::::EXISTSErrno::EXISTS
0000s0sErrno::::FETCHErrno::FETCH
0000s0sErrno::::FIRSTKEYErrno::FIRSTKEY
0000s0sErrno::::NEXTKEYErrno::NEXTKEY
0000s0sErrno::::STOREErrno::STORE
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# -*- buffer-read-only: t -*-
2#
3# This file is auto-generated. ***ANY*** changes here will be lost
4#
5
6package Errno;
71526µsrequire Exporter;
8284µs21.36ms
# spent 1.35ms (564µs+783µs) within Errno::BEGIN@8 which was called: # once (564µs+783µs) by English::BEGIN@192 at line 8
use Config;
# spent 1.35ms making 1 call to Errno::BEGIN@8 # spent 9µs making 1 call to Config::import
92219µs228µs
# spent 17µs (7+11) within Errno::BEGIN@9 which was called: # once (7µs+11µs) by English::BEGIN@192 at line 9
use strict;
# spent 17µs making 1 call to Errno::BEGIN@9 # spent 11µs making 1 call to strict::import
10
11113µs25µs"$Config{'archname'}-$Config{'osvers'}" eq
# spent 5µs making 2 calls to Config::FETCH, avg 3µs/call
12"darwin-2level-12.5.0" or
13 die "Errno architecture (darwin-2level-12.5.0) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
14
151300nsour $VERSION = "1.18";
16111µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
1716µsour @ISA = 'Exporter';
18
191200nsmy %err;
20
21
# spent 118µs within Errno::BEGIN@21 which was called: # once (118µs+0s) by English::BEGIN@192 at line 151
BEGIN {
22132µs %err = (
23 EPERM => 1,
24 ENOENT => 2,
25 ESRCH => 3,
26 EINTR => 4,
27 EIO => 5,
28 ENXIO => 6,
29 E2BIG => 7,
30 ENOEXEC => 8,
31 EBADF => 9,
32 ECHILD => 10,
33 EDEADLK => 11,
34 ENOMEM => 12,
35 EACCES => 13,
36 EFAULT => 14,
37 ENOTBLK => 15,
38 EBUSY => 16,
39 EEXIST => 17,
40 EXDEV => 18,
41 ENODEV => 19,
42 ENOTDIR => 20,
43 EISDIR => 21,
44 EINVAL => 22,
45 ENFILE => 23,
46 EMFILE => 24,
47 ENOTTY => 25,
48 ETXTBSY => 26,
49 EFBIG => 27,
50 ENOSPC => 28,
51 ESPIPE => 29,
52 EROFS => 30,
53 EMLINK => 31,
54 EPIPE => 32,
55 EDOM => 33,
56 ERANGE => 34,
57 EWOULDBLOCK => 35,
58 EAGAIN => 35,
59 EINPROGRESS => 36,
60 EALREADY => 37,
61 ENOTSOCK => 38,
62 EDESTADDRREQ => 39,
63 EMSGSIZE => 40,
64 EPROTOTYPE => 41,
65 ENOPROTOOPT => 42,
66 EPROTONOSUPPORT => 43,
67 ESOCKTNOSUPPORT => 44,
68 ENOTSUP => 45,
69 EPFNOSUPPORT => 46,
70 EAFNOSUPPORT => 47,
71 EADDRINUSE => 48,
72 EADDRNOTAVAIL => 49,
73 ENETDOWN => 50,
74 ENETUNREACH => 51,
75 ENETRESET => 52,
76 ECONNABORTED => 53,
77 ECONNRESET => 54,
78 ENOBUFS => 55,
79 EISCONN => 56,
80 ENOTCONN => 57,
81 ESHUTDOWN => 58,
82 ETOOMANYREFS => 59,
83 ETIMEDOUT => 60,
84 ECONNREFUSED => 61,
85 ELOOP => 62,
86 ENAMETOOLONG => 63,
87 EHOSTDOWN => 64,
88 EHOSTUNREACH => 65,
89 ENOTEMPTY => 66,
90 EPROCLIM => 67,
91 EUSERS => 68,
92 EDQUOT => 69,
93 ESTALE => 70,
94 EREMOTE => 71,
95 EBADRPC => 72,
96 ERPCMISMATCH => 73,
97 EPROGUNAVAIL => 74,
98 EPROGMISMATCH => 75,
99 EPROCUNAVAIL => 76,
100 ENOLCK => 77,
101 ENOSYS => 78,
102 EFTYPE => 79,
103 EAUTH => 80,
104 ENEEDAUTH => 81,
105 EPWROFF => 82,
106 EDEVERR => 83,
107 EOVERFLOW => 84,
108 EBADEXEC => 85,
109 EBADARCH => 86,
110 ESHLIBVERS => 87,
111 EBADMACHO => 88,
112 ECANCELED => 89,
113 EIDRM => 90,
114 ENOMSG => 91,
115 EILSEQ => 92,
116 ENOATTR => 93,
117 EBADMSG => 94,
118 EMULTIHOP => 95,
119 ENODATA => 96,
120 ENOLINK => 97,
121 ENOSR => 98,
122 ENOSTR => 99,
123 EPROTO => 100,
124 ETIME => 101,
125 EOPNOTSUPP => 102,
126 ENOPOLICY => 103,
127 ENOTRECOVERABLE => 104,
128 EOWNERDEAD => 105,
129 EQFULL => 106,
130 ELAST => 106,
131 );
132 # Generate proxy constant subroutines for all the values.
133 # Well, almost all the values. Unfortunately we can't assume that at this
134 # point that our symbol table is empty, as code such as if the parser has
135 # seen code such as C<exists &Errno::EINVAL>, it will have created the
136 # typeglob.
137 # Doing this before defining @EXPORT_OK etc means that even if a platform is
138 # crazy enough to define EXPORT_OK as an error constant, everything will
139 # still work, because the parser will upgrade the PCS to a real typeglob.
140 # We rely on the subroutine definitions below to update the internal caches.
141 # Don't use %each, as we don't want a copy of the value.
142110µs foreach my $name (keys %err) {
14310825µs if ($Errno::{$name}) {
144 # We expect this to be reached fairly rarely, so take an approach
145 # which uses the least compile time effort in the common case:
146 eval "sub $name() { $err{$name} }; 1" or die $@;
147 } else {
14810830µs $Errno::{$name} = \$err{$name};
149 }
150 }
1511205µs1118µs}
# spent 118µs making 1 call to Errno::BEGIN@21
152
153112µsour @EXPORT_OK = keys %err;
154
155110µsour %EXPORT_TAGS = (
156 POSIX => [qw(
157 E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
158 EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
159 EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
160 EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
161 EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
162 ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
163 ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
164 EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE
165 EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
166 ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
167 )]
168);
169
17014µs
# spent 2µs within Errno::TIEHASH which was called: # once (2µs+0s) by English::BEGIN@192 at line 200
sub TIEHASH { bless \%err }
171
172sub FETCH {
173 my (undef, $errname) = @_;
174 return "" unless exists $err{$errname};
175 my $errno = $err{$errname};
176 return $errno == $! ? $errno : 0;
177}
178
179sub STORE {
180 require Carp;
181 Carp::confess("ERRNO hash is read only!");
182}
183
18412µs*CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space
185
186sub NEXTKEY {
187 each %err;
188}
189
190sub FIRSTKEY {
191 my $s = scalar keys %err; # initialize iterator
192 each %err;
193}
194
195sub EXISTS {
196 my (undef, $errname) = @_;
197 exists $err{$errname};
198}
199
200116µs12µstie %!, __PACKAGE__; # Returns an object, objects are true.
# spent 2µs making 1 call to Errno::TIEHASH
201
202__END__