Filename | /usr/local/lib/perl5/5.24/mach/Errno.pm |
Statements | Executed 215 statements in 4.15ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.55ms | 4.42ms | BEGIN@10 | Errno::
1 | 1 | 1 | 856µs | 856µs | BEGIN@21 | Errno::
1 | 1 | 1 | 49µs | 66µs | BEGIN@8 | Errno::
1 | 1 | 1 | 5µs | 5µ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.43ms | require Exporter; | ||
8 | 2 | 61µs | 2 | 84µs | # spent 66µs (49+17) within Errno::BEGIN@8 which was called:
# once (49µs+17µs) by main::BEGIN@23 at line 8 # spent 66µs making 1 call to Errno::BEGIN@8
# spent 17µs making 1 call to strict::import |
9 | |||||
10 | 2 | 946µs | 2 | 4.49ms | # spent 4.42ms (1.55+2.87) within Errno::BEGIN@10 which was called:
# once (1.55ms+2.87ms) by main::BEGIN@23 at line 10 # spent 4.42ms making 1 call to Errno::BEGIN@10
# spent 63µs making 1 call to Config::import |
11 | 1 | 43µs | 2 | 17µs | "$Config{'archname'}-$Config{'osvers'}" eq # spent 17µs making 2 calls to Config::FETCH, avg 8µs/call |
12 | "amd64-freebsd-thread-multi-10.3-release" or | ||||
13 | die "Errno architecture (amd64-freebsd-thread-multi-10.3-release) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})"; | ||||
14 | |||||
15 | 1 | 2µs | our $VERSION = "1.25"; | ||
16 | 1 | 33µs | $VERSION = eval $VERSION; # spent 5µs executing statements in string eval | ||
17 | 1 | 16µs | our @ISA = 'Exporter'; | ||
18 | |||||
19 | 1 | 2µs | my %err; | ||
20 | |||||
21 | # spent 856µs within Errno::BEGIN@21 which was called:
# once (856µs+0s) by main::BEGIN@23 at line 142 | ||||
22 | 1 | 77µ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 | EAGAIN => 35, | ||||
58 | EWOULDBLOCK => 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 | EOPNOTSUPP => 45, | ||||
70 | EPFNOSUPPORT => 46, | ||||
71 | EAFNOSUPPORT => 47, | ||||
72 | EADDRINUSE => 48, | ||||
73 | EADDRNOTAVAIL => 49, | ||||
74 | ENETDOWN => 50, | ||||
75 | ENETUNREACH => 51, | ||||
76 | ENETRESET => 52, | ||||
77 | ECONNABORTED => 53, | ||||
78 | ECONNRESET => 54, | ||||
79 | ENOBUFS => 55, | ||||
80 | EISCONN => 56, | ||||
81 | ENOTCONN => 57, | ||||
82 | ESHUTDOWN => 58, | ||||
83 | ETOOMANYREFS => 59, | ||||
84 | ETIMEDOUT => 60, | ||||
85 | ECONNREFUSED => 61, | ||||
86 | ELOOP => 62, | ||||
87 | ENAMETOOLONG => 63, | ||||
88 | EHOSTDOWN => 64, | ||||
89 | EHOSTUNREACH => 65, | ||||
90 | ENOTEMPTY => 66, | ||||
91 | EPROCLIM => 67, | ||||
92 | EUSERS => 68, | ||||
93 | EDQUOT => 69, | ||||
94 | ESTALE => 70, | ||||
95 | EREMOTE => 71, | ||||
96 | EBADRPC => 72, | ||||
97 | ERPCMISMATCH => 73, | ||||
98 | EPROGUNAVAIL => 74, | ||||
99 | EPROGMISMATCH => 75, | ||||
100 | EPROCUNAVAIL => 76, | ||||
101 | ENOLCK => 77, | ||||
102 | ENOSYS => 78, | ||||
103 | EFTYPE => 79, | ||||
104 | EAUTH => 80, | ||||
105 | ENEEDAUTH => 81, | ||||
106 | EIDRM => 82, | ||||
107 | ENOMSG => 83, | ||||
108 | EOVERFLOW => 84, | ||||
109 | ECANCELED => 85, | ||||
110 | EILSEQ => 86, | ||||
111 | ENOATTR => 87, | ||||
112 | EDOOFUS => 88, | ||||
113 | EBADMSG => 89, | ||||
114 | EMULTIHOP => 90, | ||||
115 | ENOLINK => 91, | ||||
116 | EPROTO => 92, | ||||
117 | ENOTCAPABLE => 93, | ||||
118 | ECAPMODE => 94, | ||||
119 | ENOTRECOVERABLE => 95, | ||||
120 | ELAST => 96, | ||||
121 | EOWNERDEAD => 96, | ||||
122 | ); | ||||
123 | # Generate proxy constant subroutines for all the values. | ||||
124 | # Well, almost all the values. Unfortunately we can't assume that at this | ||||
125 | # point that our symbol table is empty, as code such as if the parser has | ||||
126 | # seen code such as C<exists &Errno::EINVAL>, it will have created the | ||||
127 | # typeglob. | ||||
128 | # Doing this before defining @EXPORT_OK etc means that even if a platform is | ||||
129 | # crazy enough to define EXPORT_OK as an error constant, everything will | ||||
130 | # still work, because the parser will upgrade the PCS to a real typeglob. | ||||
131 | # We rely on the subroutine definitions below to update the internal caches. | ||||
132 | # Don't use %each, as we don't want a copy of the value. | ||||
133 | 1 | 49µs | foreach my $name (keys %err) { | ||
134 | 99 | 528µs | if ($Errno::{$name}) { | ||
135 | # We expect this to be reached fairly rarely, so take an approach | ||||
136 | # which uses the least compile time effort in the common case: | ||||
137 | eval "sub $name() { $err{$name} }; 1" or die $@; | ||||
138 | } else { | ||||
139 | 99 | 205µs | $Errno::{$name} = \$err{$name}; | ||
140 | } | ||||
141 | } | ||||
142 | 1 | 624µs | 1 | 856µs | } # spent 856µs making 1 call to Errno::BEGIN@21 |
143 | |||||
144 | 1 | 38µs | our @EXPORT_OK = keys %err; | ||
145 | |||||
146 | 1 | 26µs | our %EXPORT_TAGS = ( | ||
147 | POSIX => [qw( | ||||
148 | E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY | ||||
149 | EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK | ||||
150 | EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH | ||||
151 | EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK | ||||
152 | EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS | ||||
153 | ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK | ||||
154 | ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM | ||||
155 | EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE | ||||
156 | EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT | ||||
157 | ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV | ||||
158 | )], | ||||
159 | ); | ||||
160 | |||||
161 | 1 | 19µs | # spent 5µs within Errno::TIEHASH which was called:
# once (5µs+0s) by main::BEGIN@23 at line 191 | ||
162 | |||||
163 | sub FETCH { | ||||
164 | my (undef, $errname) = @_; | ||||
165 | return "" unless exists $err{$errname}; | ||||
166 | my $errno = $err{$errname}; | ||||
167 | return $errno == $! ? $errno : 0; | ||||
168 | } | ||||
169 | |||||
170 | sub STORE { | ||||
171 | require Carp; | ||||
172 | Carp::confess("ERRNO hash is read only!"); | ||||
173 | } | ||||
174 | |||||
175 | 1 | 6µs | *CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space | ||
176 | |||||
177 | sub NEXTKEY { | ||||
178 | each %err; | ||||
179 | } | ||||
180 | |||||
181 | sub FIRSTKEY { | ||||
182 | my $s = scalar keys %err; # initialize iterator | ||||
183 | each %err; | ||||
184 | } | ||||
185 | |||||
186 | sub EXISTS { | ||||
187 | my (undef, $errname) = @_; | ||||
188 | exists $err{$errname}; | ||||
189 | } | ||||
190 | |||||
191 | 1 | 46µs | 1 | 5µs | tie %!, __PACKAGE__; # Returns an object, objects are true. # spent 5µs making 1 call to Errno::TIEHASH |
192 | |||||
193 | __END__ |