Filename | /usr/lib/x86_64-linux-gnu/perl-base/Errno.pm |
Statements | Executed 282 statements in 552µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 114µs | 114µs | BEGIN@16 | Errno::
1 | 1 | 1 | 7µs | 11µs | BEGIN@8 | Errno::
1 | 1 | 1 | 7µs | 8µs | _tie_it | Errno::
1 | 1 | 1 | 4µs | 5µs | BEGIN@9 | Errno::
1 | 1 | 1 | 1µs | 1µ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 by ext/Errno/Errno_pm.PL. | ||||
4 | # ***ANY*** changes here will be lost. | ||||
5 | # | ||||
6 | |||||
7 | package Errno; | ||||
8 | 2 | 14µs | 2 | 15µs | # spent 11µs (7+4) within Errno::BEGIN@8 which was called:
# once (7µs+4µs) by File::Temp::BEGIN@152 at line 8 # spent 11µs making 1 call to Errno::BEGIN@8
# spent 4µs making 1 call to Exporter::import |
9 | 2 | 186µs | 2 | 6µs | # spent 5µs (4+1) within Errno::BEGIN@9 which was called:
# once (4µs+1µs) by File::Temp::BEGIN@152 at line 9 # spent 5µs making 1 call to Errno::BEGIN@9
# spent 1µs making 1 call to strict::import |
10 | |||||
11 | 1 | 300ns | our $VERSION = "1.36"; | ||
12 | 1 | 9µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
13 | |||||
14 | 1 | 200ns | my %err; | ||
15 | |||||
16 | # spent 114µs within Errno::BEGIN@16 which was called:
# once (114µs+0s) by File::Temp::BEGIN@152 at line 172 | ||||
17 | 1 | 26µ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 | 11µ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 | 1 | 19µs | eval "sub $name() { $err{$name} }; 1" or die $@; # spent 2µs executing statements in string eval | ||
168 | } else { | ||||
169 | 133 | 29µs | $Errno::{$name} = \$err{$name}; | ||
170 | } | ||||
171 | } | ||||
172 | 1 | 196µs | 1 | 114µs | } # spent 114µs making 1 call to Errno::BEGIN@16 |
173 | |||||
174 | 1 | 11µ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 | 3µs | # spent 1µs within Errno::TIEHASH which was called:
# once (1µs+0s) by Errno::_tie_it at line 223 | ||
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 | # This is the true return value | ||||
206 | 1 | 9µs | *CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space | ||
207 | |||||
208 | sub NEXTKEY { | ||||
209 | each %err; | ||||
210 | } | ||||
211 | |||||
212 | sub FIRSTKEY { | ||||
213 | my $s = scalar keys %err; # initialize iterator | ||||
214 | each %err; | ||||
215 | } | ||||
216 | |||||
217 | sub EXISTS { | ||||
218 | my (undef, $errname) = @_; | ||||
219 | exists $err{$errname}; | ||||
220 | } | ||||
221 | |||||
222 | # spent 8µs (7+1) within Errno::_tie_it which was called:
# once (7µs+1µs) by main::BEGIN@18 at line 530 of File/Temp.pm | ||||
223 | 1 | 4µs | 1 | 1µs | tie %{$_[0]}, __PACKAGE__; # spent 1µs making 1 call to Errno::TIEHASH |
224 | } | ||||
225 | |||||
226 | __END__ |