| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Copyrights 2011-2015 by [Mark Overmeer]. |
|
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
|
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
|
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.01. |
|
5
|
6
|
|
|
6
|
|
14170
|
use warnings; |
|
|
6
|
|
|
|
|
7
|
|
|
|
6
|
|
|
|
|
140
|
|
|
6
|
6
|
|
|
6
|
|
17
|
use strict; |
|
|
6
|
|
|
|
|
5
|
|
|
|
6
|
|
|
|
|
199
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package POSIX::1003::Errno; |
|
9
|
6
|
|
|
6
|
|
24
|
use vars '$VERSION'; |
|
|
6
|
|
|
|
|
6
|
|
|
|
6
|
|
|
|
|
231
|
|
|
10
|
|
|
|
|
|
|
$VERSION = '0.99_07'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
20
|
use base 'POSIX::1003::Module'; |
|
|
6
|
|
|
|
|
6
|
|
|
|
6
|
|
|
|
|
578
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
6
|
|
|
6
|
|
26
|
use Carp 'croak'; |
|
|
6
|
|
|
|
|
6
|
|
|
|
6
|
|
|
|
|
1484
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my @constants; |
|
17
|
|
|
|
|
|
|
my @functions = qw/strerror errno errno_names/; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our %EXPORT_TAGS = |
|
20
|
|
|
|
|
|
|
( constants => \@constants |
|
21
|
|
|
|
|
|
|
, functions => \@functions |
|
22
|
|
|
|
|
|
|
, tables => [ '%errno' ] |
|
23
|
|
|
|
|
|
|
); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $errno; |
|
26
|
|
|
|
|
|
|
our %errno; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
BEGIN { |
|
29
|
6
|
|
|
6
|
|
347
|
$errno = errno_table; |
|
30
|
6
|
|
|
|
|
147
|
push @constants, keys %$errno; |
|
31
|
6
|
|
|
|
|
98
|
tie %errno, 'POSIX::1003::ReadOnlyTable', $errno; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub errno($); |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub exampleValue($) |
|
38
|
0
|
|
|
0
|
1
|
0
|
{ my ($class, $name) = @_; |
|
39
|
0
|
0
|
|
|
|
0
|
$name =~ m/^(?:WSA)?E/ or return; |
|
40
|
0
|
|
0
|
|
|
0
|
errno($name) // 'undef'; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
134
|
50
|
|
134
|
1
|
370
|
sub strerror($) { _strerror($_[0]) || "Unknown error $_[0]" } |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub errno($) |
|
48
|
137
|
|
50
|
137
|
1
|
1306
|
{ my $key = shift // return; |
|
49
|
137
|
100
|
|
|
|
533
|
$key =~ /^(?:WSA)?E/ |
|
50
|
|
|
|
|
|
|
or croak "pass the constant name $key as string"; |
|
51
|
|
|
|
|
|
|
|
|
52
|
135
|
|
|
|
|
157
|
$errno->{$key}; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _create_constant($) |
|
56
|
6
|
|
|
6
|
|
9
|
{ my ($class, $name) = @_; |
|
57
|
6
|
|
50
|
0
|
|
45
|
my $nr = $errno->{$name} // return sub() {undef}; |
|
|
0
|
|
|
|
|
0
|
|
|
58
|
6
|
|
|
0
|
|
47
|
sub() {$nr}; |
|
|
0
|
|
|
|
|
0
|
|
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
|
62
|
1
|
|
|
1
|
1
|
402
|
sub errno_names() { keys %$errno } |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |