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