| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Sys::Info::Driver::Unknown::OS; |
|
2
|
|
|
|
|
|
|
$Sys::Info::Driver::Unknown::OS::VERSION = '0.79'; |
|
3
|
1
|
|
|
1
|
|
17969
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
28
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
23
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
477
|
use POSIX (); |
|
|
1
|
|
|
|
|
6410
|
|
|
|
1
|
|
|
|
|
31
|
|
|
7
|
1
|
|
|
1
|
|
7
|
use Sys::Info::Constants qw( :unknown ); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
141
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# So, we don't support $^O yet, but we can try to emulate some features |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BEGIN { |
|
12
|
|
|
|
|
|
|
*is_root = *uptime |
|
13
|
|
|
|
|
|
|
= *tick_count |
|
14
|
11
|
|
|
11
|
|
5766
|
= sub { 0 } |
|
15
|
1
|
|
|
1
|
|
8
|
; |
|
16
|
|
|
|
|
|
|
*domain_name = *edition |
|
17
|
|
|
|
|
|
|
= *logon_server |
|
18
|
|
|
|
4
|
|
|
= sub {} |
|
19
|
1
|
|
|
|
|
421
|
; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub meta { |
|
23
|
1
|
|
|
1
|
1
|
30
|
my $self = shift; |
|
24
|
1
|
|
|
|
|
3
|
my %info; |
|
25
|
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
4
|
$info{manufacturer} = undef; |
|
27
|
1
|
|
|
|
|
3
|
$info{build_type} = undef; |
|
28
|
1
|
|
|
|
|
4
|
$info{owner} = undef; |
|
29
|
1
|
|
|
|
|
3
|
$info{organization} = undef; |
|
30
|
1
|
|
|
|
|
3
|
$info{product_id} = undef; |
|
31
|
1
|
|
|
|
|
2
|
$info{install_date} = undef; |
|
32
|
1
|
|
|
|
|
3
|
$info{boot_device} = undef; |
|
33
|
1
|
|
|
|
|
4
|
$info{physical_memory_total} = undef; |
|
34
|
1
|
|
|
|
|
3
|
$info{physical_memory_available} = undef; |
|
35
|
1
|
|
|
|
|
3
|
$info{page_file_total} = undef; |
|
36
|
1
|
|
|
|
|
3
|
$info{page_file_available} = undef; |
|
37
|
|
|
|
|
|
|
# windows specific |
|
38
|
1
|
|
|
|
|
2
|
$info{windows_dir} = undef; |
|
39
|
1
|
|
|
|
|
3
|
$info{system_dir} = undef; |
|
40
|
1
|
|
|
|
|
2
|
$info{system_manufacturer} = undef; |
|
41
|
1
|
|
|
|
|
3
|
$info{system_model} = undef; |
|
42
|
1
|
|
|
|
|
3
|
$info{system_type} = undef; |
|
43
|
1
|
|
|
|
|
2
|
$info{page_file_path} = undef; |
|
44
|
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
11
|
return %info; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub tz { |
|
49
|
2
|
|
|
2
|
1
|
585
|
my $self = shift; |
|
50
|
|
|
|
|
|
|
return exists $ENV{TZ} |
|
51
|
|
|
|
|
|
|
? $ENV{TZ} |
|
52
|
2
|
50
|
|
|
|
10
|
: do { |
|
53
|
2
|
|
|
|
|
12
|
require POSIX; |
|
54
|
2
|
|
|
|
|
151
|
POSIX::strftime('%Z', localtime); |
|
55
|
|
|
|
|
|
|
}; |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub fs { |
|
59
|
1
|
|
|
1
|
1
|
4
|
my $self = shift; |
|
60
|
|
|
|
|
|
|
return( |
|
61
|
1
|
|
|
|
|
7
|
unknown => 1, |
|
62
|
|
|
|
|
|
|
); |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub name { |
|
66
|
3
|
|
|
3
|
1
|
30
|
my($self, @args) = @_; |
|
67
|
3
|
50
|
|
|
|
14
|
my %opt = @args % 2 ? () : @args; |
|
68
|
3
|
|
|
|
|
12
|
my $uname = $self->uname; |
|
69
|
|
|
|
|
|
|
my $rv = $opt{long} ? join(q{ }, $uname->{sysname}, $uname->{release}) |
|
70
|
|
|
|
|
|
|
: $uname->{sysname} |
|
71
|
3
|
100
|
|
|
|
70
|
; |
|
72
|
3
|
|
|
|
|
18
|
return $rv; |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
1
|
|
|
1
|
1
|
5
|
sub version { return shift->uname->{release} } |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub build { |
|
78
|
1
|
|
50
|
1
|
1
|
294
|
my $build = shift->uname->{version} || return; |
|
79
|
1
|
50
|
|
|
|
17
|
if ( $build =~ UN_RE_BUILD ) { |
|
80
|
0
|
|
|
|
|
0
|
return $1; |
|
81
|
|
|
|
|
|
|
} |
|
82
|
1
|
|
|
|
|
5
|
return $build; |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
2
|
|
|
2
|
1
|
610
|
sub node_name { return shift->uname->{nodename} } |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub login_name { |
|
88
|
2
|
|
|
2
|
1
|
6237
|
my $name; |
|
89
|
2
|
|
|
|
|
4
|
my $eok = eval { $name = getlogin }; |
|
|
2
|
|
|
|
|
817
|
|
|
90
|
2
|
|
|
|
|
13
|
return $name; |
|
91
|
|
|
|
|
|
|
} |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub bitness { |
|
94
|
1
|
|
|
1
|
1
|
315
|
my $self = shift; |
|
95
|
1
|
|
|
|
|
3
|
return; |
|
96
|
|
|
|
|
|
|
} |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
__END__ |