File | /usr/local/lib/perl5/5.8.8/i686-linux/Errno.pm |
Statements Executed | 3251 |
Statement Execution Time | 44.4ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
461 | 1 | 1 | 36.6ms | 40.5ms | FETCH | Errno::
461 | 1 | 2 | 3.91ms | 3.91ms | EINPROGRESS (xsub) | Errno::
0 | 0 | 0 | 0s | 0s | BEGIN | Errno::
0 | 0 | 0 | 0s | 0s | EXISTS | Errno::
0 | 0 | 0 | 0s | 0s | FIRSTKEY | Errno::
0 | 0 | 0 | 0s | 0s | NEXTKEY | Errno::
0 | 0 | 0 | 0s | 0s | STORE | Errno::
0 | 0 | 0 | 0s | 0s | TIEHASH | Errno::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # | ||||
2 | # This file is auto-generated. ***ANY*** changes here will be lost | ||||
3 | # | ||||
4 | |||||
5 | package Errno; | ||||
6 | 1 | 6µs | our (@EXPORT_OK,%EXPORT_TAGS,@ISA,$VERSION,%errno,$AUTOLOAD); | ||
7 | 3 | 66µs | use Exporter (); | ||
8 | 3 | 82µs | 1 | 73µs | use Config; # spent 73µs making 1 call to Config::import |
9 | 3 | 2.69ms | 1 | 22µs | use strict; # spent 22µs making 1 call to strict::import |
10 | |||||
11 | 1 | 61µs | 2 | 44µs | "$Config{'archname'}-$Config{'osvers'}" eq # spent 44µs making 2 calls to Config::FETCH, avg 22µs/call |
12 | "i686-linux-2.6.9-42.0.10.el" or | ||||
13 | die "Errno architecture (i686-linux-2.6.9-42.0.10.el) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})"; | ||||
14 | |||||
15 | 1 | 5µs | $VERSION = "1.09_01"; | ||
16 | 1 | 67µs | $VERSION = eval $VERSION; | ||
17 | 1 | 8µs | @ISA = qw(Exporter); | ||
18 | |||||
19 | 1 | 59µs | @EXPORT_OK = qw(EBADR ENOMSG ENOTSUP ESTRPIPE EADDRINUSE EL3HLT EBADF | ||
20 | ENOTBLK ENAVAIL ECHRNG ENOTNAM ELNRNG ENOKEY EXDEV EBADE EBADSLT | ||||
21 | ECONNREFUSED ENOSTR ENONET EOVERFLOW EISCONN EFBIG EKEYREVOKED | ||||
22 | ECONNRESET EWOULDBLOCK ELIBMAX EREMOTEIO ENOPKG ELIBSCN EDESTADDRREQ | ||||
23 | ENOTSOCK EIO EMEDIUMTYPE EINPROGRESS ERANGE EAFNOSUPPORT EADDRNOTAVAIL | ||||
24 | EINTR EREMOTE EILSEQ ENOMEM EPIPE ENETUNREACH ENODATA EUSERS | ||||
25 | EOPNOTSUPP EPROTO EISNAM ESPIPE EALREADY ENAMETOOLONG ENOEXEC EISDIR | ||||
26 | EBADRQC EEXIST EDOTDOT ELIBBAD ESRCH EFAULT EXFULL EDEADLOCK EAGAIN | ||||
27 | ENOPROTOOPT ENETDOWN EPROTOTYPE EL2NSYNC ENETRESET EUCLEAN EADV EROFS | ||||
28 | ESHUTDOWN EMULTIHOP EPROTONOSUPPORT ENFILE ENOLCK ECONNABORTED | ||||
29 | ECANCELED EDEADLK ESRMNT ENOLINK ETIME ENOTDIR EINVAL ENOTTY ENOANO | ||||
30 | ELOOP ENOENT EPFNOSUPPORT EBADMSG ENOMEDIUM EL2HLT EDOM EBFONT | ||||
31 | EKEYEXPIRED EMSGSIZE ENOCSI EL3RST ENOSPC EIDRM ENOBUFS ENOSYS | ||||
32 | EHOSTDOWN EBADFD ENOSR ENOTCONN ESTALE EDQUOT EKEYREJECTED EMFILE | ||||
33 | EACCES EBUSY E2BIG EPERM ELIBEXEC ETOOMANYREFS ELIBACC ENOTUNIQ ECOMM | ||||
34 | ERESTART ESOCKTNOSUPPORT EUNATCH ETIMEDOUT ENXIO ENODEV ETXTBSY EMLINK | ||||
35 | ECHILD EHOSTUNREACH EREMCHG ENOTEMPTY); | ||||
36 | |||||
37 | 1 | 40µs | %EXPORT_TAGS = ( | ||
38 | POSIX => [qw( | ||||
39 | E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY | ||||
40 | EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK | ||||
41 | EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH | ||||
42 | EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK | ||||
43 | EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS | ||||
44 | ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK | ||||
45 | ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM | ||||
46 | EPFNOSUPPORT EPIPE EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART | ||||
47 | EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT | ||||
48 | ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV | ||||
49 | )] | ||||
50 | ); | ||||
51 | |||||
52 | sub EPERM () { 1 } | ||||
53 | sub ENOENT () { 2 } | ||||
54 | sub ESRCH () { 3 } | ||||
55 | sub EINTR () { 4 } | ||||
56 | sub EIO () { 5 } | ||||
57 | sub ENXIO () { 6 } | ||||
58 | sub E2BIG () { 7 } | ||||
59 | sub ENOEXEC () { 8 } | ||||
60 | sub EBADF () { 9 } | ||||
61 | sub ECHILD () { 10 } | ||||
62 | sub EWOULDBLOCK () { 11 } | ||||
63 | sub EAGAIN () { 11 } | ||||
64 | sub ENOMEM () { 12 } | ||||
65 | sub EACCES () { 13 } | ||||
66 | sub EFAULT () { 14 } | ||||
67 | sub ENOTBLK () { 15 } | ||||
68 | sub EBUSY () { 16 } | ||||
69 | sub EEXIST () { 17 } | ||||
70 | sub EXDEV () { 18 } | ||||
71 | sub ENODEV () { 19 } | ||||
72 | sub ENOTDIR () { 20 } | ||||
73 | sub EISDIR () { 21 } | ||||
74 | sub EINVAL () { 22 } | ||||
75 | sub ENFILE () { 23 } | ||||
76 | sub EMFILE () { 24 } | ||||
77 | sub ENOTTY () { 25 } | ||||
78 | sub ETXTBSY () { 26 } | ||||
79 | sub EFBIG () { 27 } | ||||
80 | sub ENOSPC () { 28 } | ||||
81 | sub ESPIPE () { 29 } | ||||
82 | sub EROFS () { 30 } | ||||
83 | sub EMLINK () { 31 } | ||||
84 | sub EPIPE () { 32 } | ||||
85 | sub EDOM () { 33 } | ||||
86 | sub ERANGE () { 34 } | ||||
87 | sub EDEADLOCK () { 35 } | ||||
88 | sub EDEADLK () { 35 } | ||||
89 | sub ENAMETOOLONG () { 36 } | ||||
90 | sub ENOLCK () { 37 } | ||||
91 | sub ENOSYS () { 38 } | ||||
92 | sub ENOTEMPTY () { 39 } | ||||
93 | sub ELOOP () { 40 } | ||||
94 | sub ENOMSG () { 42 } | ||||
95 | sub EIDRM () { 43 } | ||||
96 | sub ECHRNG () { 44 } | ||||
97 | sub EL2NSYNC () { 45 } | ||||
98 | sub EL3HLT () { 46 } | ||||
99 | sub EL3RST () { 47 } | ||||
100 | sub ELNRNG () { 48 } | ||||
101 | sub EUNATCH () { 49 } | ||||
102 | sub ENOCSI () { 50 } | ||||
103 | sub EL2HLT () { 51 } | ||||
104 | sub EBADE () { 52 } | ||||
105 | sub EBADR () { 53 } | ||||
106 | sub EXFULL () { 54 } | ||||
107 | sub ENOANO () { 55 } | ||||
108 | sub EBADRQC () { 56 } | ||||
109 | sub EBADSLT () { 57 } | ||||
110 | sub EBFONT () { 59 } | ||||
111 | sub ENOSTR () { 60 } | ||||
112 | sub ENODATA () { 61 } | ||||
113 | sub ETIME () { 62 } | ||||
114 | sub ENOSR () { 63 } | ||||
115 | sub ENONET () { 64 } | ||||
116 | sub ENOPKG () { 65 } | ||||
117 | sub EREMOTE () { 66 } | ||||
118 | sub ENOLINK () { 67 } | ||||
119 | sub EADV () { 68 } | ||||
120 | sub ESRMNT () { 69 } | ||||
121 | sub ECOMM () { 70 } | ||||
122 | sub EPROTO () { 71 } | ||||
123 | sub EMULTIHOP () { 72 } | ||||
124 | sub EDOTDOT () { 73 } | ||||
125 | sub EBADMSG () { 74 } | ||||
126 | sub EOVERFLOW () { 75 } | ||||
127 | sub ENOTUNIQ () { 76 } | ||||
128 | sub EBADFD () { 77 } | ||||
129 | sub EREMCHG () { 78 } | ||||
130 | sub ELIBACC () { 79 } | ||||
131 | sub ELIBBAD () { 80 } | ||||
132 | sub ELIBSCN () { 81 } | ||||
133 | sub ELIBMAX () { 82 } | ||||
134 | sub ELIBEXEC () { 83 } | ||||
135 | sub EILSEQ () { 84 } | ||||
136 | sub ERESTART () { 85 } | ||||
137 | sub ESTRPIPE () { 86 } | ||||
138 | sub EUSERS () { 87 } | ||||
139 | sub ENOTSOCK () { 88 } | ||||
140 | sub EDESTADDRREQ () { 89 } | ||||
141 | sub EMSGSIZE () { 90 } | ||||
142 | sub EPROTOTYPE () { 91 } | ||||
143 | sub ENOPROTOOPT () { 92 } | ||||
144 | sub EPROTONOSUPPORT () { 93 } | ||||
145 | sub ESOCKTNOSUPPORT () { 94 } | ||||
146 | sub ENOTSUP () { 95 } | ||||
147 | sub EOPNOTSUPP () { 95 } | ||||
148 | sub EPFNOSUPPORT () { 96 } | ||||
149 | sub EAFNOSUPPORT () { 97 } | ||||
150 | sub EADDRINUSE () { 98 } | ||||
151 | sub EADDRNOTAVAIL () { 99 } | ||||
152 | sub ENETDOWN () { 100 } | ||||
153 | sub ENETUNREACH () { 101 } | ||||
154 | sub ENETRESET () { 102 } | ||||
155 | sub ECONNABORTED () { 103 } | ||||
156 | sub ECONNRESET () { 104 } | ||||
157 | sub ENOBUFS () { 105 } | ||||
158 | sub EISCONN () { 106 } | ||||
159 | sub ENOTCONN () { 107 } | ||||
160 | sub ESHUTDOWN () { 108 } | ||||
161 | sub ETOOMANYREFS () { 109 } | ||||
162 | sub ETIMEDOUT () { 110 } | ||||
163 | sub ECONNREFUSED () { 111 } | ||||
164 | sub EHOSTDOWN () { 112 } | ||||
165 | sub EHOSTUNREACH () { 113 } | ||||
166 | sub EALREADY () { 114 } | ||||
167 | sub EINPROGRESS () { 115 } | ||||
168 | sub ESTALE () { 116 } | ||||
169 | sub EUCLEAN () { 117 } | ||||
170 | sub ENOTNAM () { 118 } | ||||
171 | sub ENAVAIL () { 119 } | ||||
172 | sub EISNAM () { 120 } | ||||
173 | sub EREMOTEIO () { 121 } | ||||
174 | sub EDQUOT () { 122 } | ||||
175 | sub ENOMEDIUM () { 123 } | ||||
176 | sub EMEDIUMTYPE () { 124 } | ||||
177 | sub ECANCELED () { 125 } | ||||
178 | sub ENOKEY () { 126 } | ||||
179 | sub EKEYEXPIRED () { 127 } | ||||
180 | sub EKEYREVOKED () { 128 } | ||||
181 | sub EKEYREJECTED () { 129 } | ||||
182 | |||||
183 | 1 | 28µs | sub TIEHASH { bless [] } | ||
184 | |||||
185 | # spent 40.5ms (36.6+3.91) within Errno::FETCH which was called 461 times, avg 88µs/call:
# 461 times (36.6ms+3.91ms) by IO::Socket::connect at line 115 of IO/Socket.pm, avg 88µs/call | ||||
186 | 461 | 3.37ms | my ($self, $errname) = @_; | ||
187 | 461 | 5.79ms | my $proto = prototype("Errno::$errname"); | ||
188 | 461 | 2.27ms | my $errno = ""; | ||
189 | 461 | 4.82ms | if (defined($proto) && $proto eq "") { | ||
190 | 3 | 563µs | 1 | 105µs | no strict 'refs'; # spent 105µs making 1 call to strict::unimport |
191 | 461 | 10.8ms | 461 | 3.91ms | $errno = &$errname; # spent 3.91ms making 461 calls to Errno::EINPROGRESS, avg 8µs/call |
192 | 461 | 6.58ms | $errno = 0 unless $! == $errno; | ||
193 | } | ||||
194 | 461 | 6.94ms | return $errno; | ||
195 | } | ||||
196 | |||||
197 | sub STORE { | ||||
198 | require Carp; | ||||
199 | Carp::confess("ERRNO hash is read only!"); | ||||
200 | } | ||||
201 | |||||
202 | 1 | 8µs | *CLEAR = \&STORE; | ||
203 | 1 | 5µs | *DELETE = \&STORE; | ||
204 | |||||
205 | sub NEXTKEY { | ||||
206 | my($k,$v); | ||||
207 | while(($k,$v) = each %Errno::) { | ||||
208 | my $proto = prototype("Errno::$k"); | ||||
209 | last if (defined($proto) && $proto eq ""); | ||||
210 | } | ||||
211 | $k | ||||
212 | } | ||||
213 | |||||
214 | sub FIRSTKEY { | ||||
215 | my $s = scalar keys %Errno::; # initialize iterator | ||||
216 | goto &NEXTKEY; | ||||
217 | } | ||||
218 | |||||
219 | sub EXISTS { | ||||
220 | my ($self, $errname) = @_; | ||||
221 | my $r = ref $errname; | ||||
222 | my $proto = !$r || $r eq 'CODE' ? prototype($errname) : undef; | ||||
223 | defined($proto) && $proto eq ""; | ||||
224 | } | ||||
225 | |||||
226 | 1 | 17µs | tie %!, __PACKAGE__; | ||
227 | |||||
228 | 1 | 76µs | 1; | ||
229 | __END__ | ||||
230 | |||||
231 | =head1 NAME | ||||
232 | |||||
233 | Errno - System errno constants | ||||
234 | |||||
235 | =head1 SYNOPSIS | ||||
236 | |||||
237 | use Errno qw(EINTR EIO :POSIX); | ||||
238 | |||||
239 | =head1 DESCRIPTION | ||||
240 | |||||
241 | C<Errno> defines and conditionally exports all the error constants | ||||
242 | defined in your system C<errno.h> include file. It has a single export | ||||
243 | tag, C<:POSIX>, which will export all POSIX defined error numbers. | ||||
244 | |||||
245 | C<Errno> also makes C<%!> magic such that each element of C<%!> has a | ||||
246 | non-zero value only if C<$!> is set to that value. For example: | ||||
247 | |||||
248 | use Errno; | ||||
249 | |||||
250 | unless (open(FH, "/fangorn/spouse")) { | ||||
251 | if ($!{ENOENT}) { | ||||
252 | warn "Get a wife!\n"; | ||||
253 | } else { | ||||
254 | warn "This path is barred: $!"; | ||||
255 | } | ||||
256 | } | ||||
257 | |||||
258 | If a specified constant C<EFOO> does not exist on the system, C<$!{EFOO}> | ||||
259 | returns C<"">. You may use C<exists $!{EFOO}> to check whether the | ||||
260 | constant is available on the system. | ||||
261 | |||||
262 | =head1 CAVEATS | ||||
263 | |||||
264 | Importing a particular constant may not be very portable, because the | ||||
265 | import will fail on platforms that do not have that constant. A more | ||||
266 | portable way to set C<$!> to a valid value is to use: | ||||
267 | |||||
268 | if (exists &Errno::EFOO) { | ||||
269 | $! = &Errno::EFOO; | ||||
270 | } | ||||
271 | |||||
272 | =head1 AUTHOR | ||||
273 | |||||
274 | Graham Barr <gbarr@pobox.com> | ||||
275 | |||||
276 | =head1 COPYRIGHT | ||||
277 | |||||
278 | Copyright (c) 1997-8 Graham Barr. All rights reserved. | ||||
279 | This program is free software; you can redistribute it and/or modify it | ||||
280 | under the same terms as Perl itself. | ||||
281 | |||||
282 | =cut | ||||
283 | |||||
# spent 3.91ms within Errno::EINPROGRESS which was called 461 times, avg 8µs/call:
# 461 times (3.91ms+0s) by Errno::FETCH at line 191 of Errno.pm, avg 8µs/call |