Filename | /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/5.18.2/darwin-2level/Errno.pm |
Statements | Executed 233 statements in 1.21ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 564µs | 1.35ms | BEGIN@8 | Errno::
1 | 1 | 1 | 118µs | 118µs | BEGIN@21 | Errno::
1 | 1 | 1 | 7µs | 17µs | BEGIN@9 | 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 | 526µs | require Exporter; | ||
8 | 2 | 84µs | 2 | 1.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 # spent 1.35ms making 1 call to Errno::BEGIN@8
# spent 9µs making 1 call to Config::import |
9 | 2 | 219µs | 2 | 28µ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 # spent 17µs making 1 call to Errno::BEGIN@9
# spent 11µs making 1 call to strict::import |
10 | |||||
11 | 1 | 13µs | 2 | 5µ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 | |||||
15 | 1 | 300ns | our $VERSION = "1.18"; | ||
16 | 1 | 11µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
17 | 1 | 6µs | our @ISA = 'Exporter'; | ||
18 | |||||
19 | 1 | 200ns | my %err; | ||
20 | |||||
21 | # spent 118µs within Errno::BEGIN@21 which was called:
# once (118µs+0s) by English::BEGIN@192 at line 151 | ||||
22 | 1 | 32µ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. | ||||
142 | 1 | 10µs | foreach my $name (keys %err) { | ||
143 | 108 | 25µ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 { | ||||
148 | 108 | 30µs | $Errno::{$name} = \$err{$name}; | ||
149 | } | ||||
150 | } | ||||
151 | 1 | 205µs | 1 | 118µs | } # spent 118µs making 1 call to Errno::BEGIN@21 |
152 | |||||
153 | 1 | 12µs | our @EXPORT_OK = keys %err; | ||
154 | |||||
155 | 1 | 10µs | our %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 | |||||
170 | 1 | 4µs | # spent 2µs within Errno::TIEHASH which was called:
# once (2µs+0s) by English::BEGIN@192 at line 200 | ||
171 | |||||
172 | sub FETCH { | ||||
173 | my (undef, $errname) = @_; | ||||
174 | return "" unless exists $err{$errname}; | ||||
175 | my $errno = $err{$errname}; | ||||
176 | return $errno == $! ? $errno : 0; | ||||
177 | } | ||||
178 | |||||
179 | sub STORE { | ||||
180 | require Carp; | ||||
181 | Carp::confess("ERRNO hash is read only!"); | ||||
182 | } | ||||
183 | |||||
184 | 1 | 2µs | *CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space | ||
185 | |||||
186 | sub NEXTKEY { | ||||
187 | each %err; | ||||
188 | } | ||||
189 | |||||
190 | sub FIRSTKEY { | ||||
191 | my $s = scalar keys %err; # initialize iterator | ||||
192 | each %err; | ||||
193 | } | ||||
194 | |||||
195 | sub EXISTS { | ||||
196 | my (undef, $errname) = @_; | ||||
197 | exists $err{$errname}; | ||||
198 | } | ||||
199 | |||||
200 | 1 | 16µs | 1 | 2µs | tie %!, __PACKAGE__; # Returns an object, objects are true. # spent 2µs making 1 call to Errno::TIEHASH |
201 | |||||
202 | __END__ |