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