Filename | /usr/lib/perl5/5.14/i686-cygwin-threads-64int/Errno.pm |
Statements | Executed 271 statements in 1.99ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 387µs | 387µs | BEGIN@21 | Errno::
1 | 1 | 1 | 212µs | 234µs | BEGIN@8 | Errno::
1 | 1 | 1 | 13µs | 18µs | BEGIN@9 | Errno::
1 | 1 | 1 | 12µs | 12µs | TIEHASH | Errno::
0 | 0 | 0 | 0s | 0s | EXISTS | Errno::
0 | 0 | 0 | 0s | 0s | FETCH | Errno::
0 | 0 | 0 | 0s | 0s | FIRSTKEY | Errno::
0 | 0 | 0 | 0s | 0s | NEXTKEY | Errno::
0 | 0 | 0 | 0s | 0s | STORE | Errno::
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 | |||||
6 | package Errno; | ||||
7 | 1 | 1µs | require Exporter; | ||
8 | 2 | 59µs | 2 | 256µs | # spent 234µs (212+22) within Errno::BEGIN@8 which was called:
# once (212µs+22µs) by File::Temp::BEGIN@148 at line 8 # spent 234µs making 1 call to Errno::BEGIN@8
# spent 22µs making 1 call to Config::import |
9 | 2 | 667µs | 2 | 23µs | # spent 18µs (13+5) within Errno::BEGIN@9 which was called:
# once (13µs+5µs) by File::Temp::BEGIN@148 at line 9 # spent 18µs making 1 call to Errno::BEGIN@9
# spent 5µs making 1 call to strict::import |
10 | |||||
11 | 1 | 22µs | 2 | 13µs | "$Config{'archname'}-$Config{'osvers'}" eq # spent 13µs making 2 calls to Config::FETCH, avg 7µs/call |
12 | "cygwin-thread-multi-64int-1.7.15(0.26053)" or | ||||
13 | die "Errno architecture (cygwin-thread-multi-64int-1.7.15(0.26053)) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})"; | ||||
14 | |||||
15 | 1 | 1µs | our $VERSION = "1.13"; | ||
16 | 1 | 26µs | $VERSION = eval $VERSION; # spent 6µs executing statements in string eval | ||
17 | 1 | 10µs | our @ISA = 'Exporter'; | ||
18 | |||||
19 | 1 | 500ns | my %err; | ||
20 | |||||
21 | # spent 387µs within Errno::BEGIN@21 which was called:
# once (387µs+0s) by File::Temp::BEGIN@148 at line 170 | ||||
22 | 2 | 127µ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 | EWOULDBLOCK => 11, | ||||
34 | EAGAIN => 11, | ||||
35 | ENOMEM => 12, | ||||
36 | EACCES => 13, | ||||
37 | EFAULT => 14, | ||||
38 | ENOTBLK => 15, | ||||
39 | EBUSY => 16, | ||||
40 | EEXIST => 17, | ||||
41 | EXDEV => 18, | ||||
42 | ENODEV => 19, | ||||
43 | ENOTDIR => 20, | ||||
44 | EISDIR => 21, | ||||
45 | EINVAL => 22, | ||||
46 | ENFILE => 23, | ||||
47 | EMFILE => 24, | ||||
48 | ENOTTY => 25, | ||||
49 | ETXTBSY => 26, | ||||
50 | EFBIG => 27, | ||||
51 | ENOSPC => 28, | ||||
52 | ESPIPE => 29, | ||||
53 | EROFS => 30, | ||||
54 | EMLINK => 31, | ||||
55 | EPIPE => 32, | ||||
56 | EDOM => 33, | ||||
57 | ERANGE => 34, | ||||
58 | ENOMSG => 35, | ||||
59 | EIDRM => 36, | ||||
60 | ECHRNG => 37, | ||||
61 | EL2NSYNC => 38, | ||||
62 | EL3HLT => 39, | ||||
63 | EL3RST => 40, | ||||
64 | ELNRNG => 41, | ||||
65 | EUNATCH => 42, | ||||
66 | ENOCSI => 43, | ||||
67 | EL2HLT => 44, | ||||
68 | EDEADLK => 45, | ||||
69 | ENOLCK => 46, | ||||
70 | EBADE => 50, | ||||
71 | EBADR => 51, | ||||
72 | EXFULL => 52, | ||||
73 | ENOANO => 53, | ||||
74 | EBADRQC => 54, | ||||
75 | EBADSLT => 55, | ||||
76 | EDEADLOCK => 56, | ||||
77 | EBFONT => 57, | ||||
78 | ENOSTR => 60, | ||||
79 | ENODATA => 61, | ||||
80 | ETIME => 62, | ||||
81 | ENOSR => 63, | ||||
82 | ENONET => 64, | ||||
83 | ENOPKG => 65, | ||||
84 | EREMOTE => 66, | ||||
85 | ENOLINK => 67, | ||||
86 | EADV => 68, | ||||
87 | ESRMNT => 69, | ||||
88 | ECOMM => 70, | ||||
89 | EPROTO => 71, | ||||
90 | EMULTIHOP => 74, | ||||
91 | ELBIN => 75, | ||||
92 | EDOTDOT => 76, | ||||
93 | EBADMSG => 77, | ||||
94 | EFTYPE => 79, | ||||
95 | ENOTUNIQ => 80, | ||||
96 | EBADFD => 81, | ||||
97 | EREMCHG => 82, | ||||
98 | ELIBACC => 83, | ||||
99 | ELIBBAD => 84, | ||||
100 | ELIBSCN => 85, | ||||
101 | ELIBMAX => 86, | ||||
102 | ELIBEXEC => 87, | ||||
103 | ENOSYS => 88, | ||||
104 | ENMFILE => 89, | ||||
105 | ENOTEMPTY => 90, | ||||
106 | ENAMETOOLONG => 91, | ||||
107 | ELOOP => 92, | ||||
108 | EOPNOTSUPP => 95, | ||||
109 | EPFNOSUPPORT => 96, | ||||
110 | ECONNRESET => 104, | ||||
111 | ENOBUFS => 105, | ||||
112 | EAFNOSUPPORT => 106, | ||||
113 | EPROTOTYPE => 107, | ||||
114 | ENOTSOCK => 108, | ||||
115 | ENOPROTOOPT => 109, | ||||
116 | ESHUTDOWN => 110, | ||||
117 | ECONNREFUSED => 111, | ||||
118 | EADDRINUSE => 112, | ||||
119 | ECONNABORTED => 113, | ||||
120 | ENETUNREACH => 114, | ||||
121 | ENETDOWN => 115, | ||||
122 | ETIMEDOUT => 116, | ||||
123 | EHOSTDOWN => 117, | ||||
124 | EHOSTUNREACH => 118, | ||||
125 | EINPROGRESS => 119, | ||||
126 | EALREADY => 120, | ||||
127 | EDESTADDRREQ => 121, | ||||
128 | EMSGSIZE => 122, | ||||
129 | EPROTONOSUPPORT => 123, | ||||
130 | ESOCKTNOSUPPORT => 124, | ||||
131 | EADDRNOTAVAIL => 125, | ||||
132 | ENETRESET => 126, | ||||
133 | EISCONN => 127, | ||||
134 | ENOTCONN => 128, | ||||
135 | ETOOMANYREFS => 129, | ||||
136 | EPROCLIM => 130, | ||||
137 | EUSERS => 131, | ||||
138 | EDQUOT => 132, | ||||
139 | ESTALE => 133, | ||||
140 | ENOTSUP => 134, | ||||
141 | ENOMEDIUM => 135, | ||||
142 | ENOSHARE => 136, | ||||
143 | ECASECLASH => 137, | ||||
144 | EILSEQ => 138, | ||||
145 | EOVERFLOW => 139, | ||||
146 | ECANCELED => 140, | ||||
147 | ENOTRECOVERABLE => 141, | ||||
148 | EOWNERDEAD => 142, | ||||
149 | ESTRPIPE => 143, | ||||
150 | ); | ||||
151 | # Generate proxy constant subroutines for all the values. | ||||
152 | # Well, almost all the values. Unfortunately we can't assume that at this | ||||
153 | # point that our symbol table is empty, as code such as if the parser has | ||||
154 | # seen code such as C<exists &Errno::EINVAL>, it will have created the | ||||
155 | # typeglob. | ||||
156 | # Doing this before defining @EXPORT_OK etc means that even if a platform is | ||||
157 | # crazy enough to define EXPORT_OK as an error constant, everything will | ||||
158 | # still work, because the parser will upgrade the PCS to a real typeglob. | ||||
159 | # We rely on the subroutine definitions below to update the internal caches. | ||||
160 | # Don't use %each, as we don't want a copy of the value. | ||||
161 | foreach my $name (keys %err) { | ||||
162 | 254 | 261µs | if ($Errno::{$name}) { | ||
163 | # We expect this to be reached fairly rarely, so take an approach | ||||
164 | # which uses the least compile time effort in the common case: | ||||
165 | eval "sub $name() { $err{$name} }; 1" or die $@; | ||||
166 | } else { | ||||
167 | $Errno::{$name} = \$err{$name}; | ||||
168 | } | ||||
169 | } | ||||
170 | 1 | 628µs | 1 | 387µs | } # spent 387µs making 1 call to Errno::BEGIN@21 |
171 | |||||
172 | 1 | 48µs | our @EXPORT_OK = keys %err; | ||
173 | |||||
174 | 1 | 35µs | our %EXPORT_TAGS = ( | ||
175 | POSIX => [qw( | ||||
176 | E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY | ||||
177 | EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK | ||||
178 | EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH | ||||
179 | EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK | ||||
180 | EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS | ||||
181 | ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK | ||||
182 | ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM | ||||
183 | EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE | ||||
184 | EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT | ||||
185 | ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV | ||||
186 | )] | ||||
187 | ); | ||||
188 | |||||
189 | 1 | 16µs | # spent 12µs within Errno::TIEHASH which was called:
# once (12µs+0s) by File::Temp::BEGIN@148 at line 219 | ||
190 | |||||
191 | sub FETCH { | ||||
192 | my (undef, $errname) = @_; | ||||
193 | return "" unless exists $err{$errname}; | ||||
194 | my $errno = $err{$errname}; | ||||
195 | return $errno == $! ? $errno : 0; | ||||
196 | } | ||||
197 | |||||
198 | sub STORE { | ||||
199 | require Carp; | ||||
200 | Carp::confess("ERRNO hash is read only!"); | ||||
201 | } | ||||
202 | |||||
203 | 1 | 4µs | *CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space | ||
204 | |||||
205 | sub NEXTKEY { | ||||
206 | each %err; | ||||
207 | } | ||||
208 | |||||
209 | sub FIRSTKEY { | ||||
210 | my $s = scalar keys %err; # initialize iterator | ||||
211 | each %err; | ||||
212 | } | ||||
213 | |||||
214 | sub EXISTS { | ||||
215 | my (undef, $errname) = @_; | ||||
216 | exists $err{$errname}; | ||||
217 | } | ||||
218 | |||||
219 | 1 | 89µs | 1 | 12µs | tie %!, __PACKAGE__; # Returns an object, objects are true. # spent 12µs making 1 call to Errno::TIEHASH |
220 | |||||
221 | __END__ |