line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sys::Info::Constants; |
2
|
1
|
|
|
1
|
|
17290
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
3
|
use vars qw( $VERSION @EXPORT_OK %EXPORT_TAGS ); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
61
|
|
5
|
1
|
|
|
1
|
|
8
|
use Carp qw( croak ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
61
|
|
6
|
1
|
|
|
1
|
|
4
|
use base qw( Exporter ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
169
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$VERSION = '0.7804'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
BEGIN { |
11
|
1
|
50
|
|
1
|
|
4
|
if ( ! defined &OSID ) { |
12
|
1
|
|
|
|
|
5
|
my %OS = ( |
13
|
|
|
|
|
|
|
MSWin32 => 'Windows', |
14
|
|
|
|
|
|
|
MSWin64 => 'Windows', |
15
|
|
|
|
|
|
|
linux => 'Linux', |
16
|
|
|
|
|
|
|
darwin => 'OSX', |
17
|
|
|
|
|
|
|
); |
18
|
1
|
|
|
|
|
4
|
$OS{$_} = 'BSD' for qw( freebsd openbsd netbsd ); |
19
|
1
|
|
50
|
|
|
3
|
my $ID = $OS{ $^O } || 'Unknown'; |
20
|
2
|
|
|
2
|
|
130
|
*OSID = sub () { "$ID" } |
21
|
1
|
|
|
|
|
23
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
4
|
use constant DCPU_LOAD_LAST_01 => 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
25
|
1
|
|
|
1
|
|
3
|
use constant DCPU_LOAD_LAST_05 => 1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
26
|
1
|
|
|
1
|
|
18
|
use constant DCPU_LOAD_LAST_10 => 2; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
27
|
1
|
|
|
1
|
|
4
|
use constant DCPU_LOAD => (0..2); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
43
|
|
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
1
|
|
4
|
use constant WIN_REG_HW_KEY => 'HKEY_LOCAL_MACHINE/HARDWARE/'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
30
|
1
|
|
|
|
|
49
|
use constant WIN_REG_CPU_KEY => WIN_REG_HW_KEY |
31
|
1
|
|
|
1
|
|
3
|
. q{DESCRIPTION/System/CentralProcessor}; |
|
1
|
|
|
|
|
4
|
|
32
|
1
|
|
|
|
|
57
|
use constant WIN_REG_CDKEY => q{HKEY_LOCAL_MACHINE/Software/Microsoft/} |
33
|
1
|
|
|
1
|
|
5
|
. q{Windows NT/CurrentVersion//DigitalProductId}; |
|
1
|
|
|
|
|
7
|
|
34
|
1
|
|
|
1
|
|
6
|
use constant WIN_REG_OCDKEY => q{HKEY_LOCAL_MACHINE/Software/Microsoft/Office}; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
61
|
|
35
|
1
|
|
|
1
|
|
6
|
use constant WIN_WMI_DATE_TMPL => 'A4 A2 A2 A2 A2 A2'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
59
|
|
36
|
1
|
|
|
1
|
|
4
|
use constant WIN_B24_DIGITS => qw( B C D F G H J K M P Q R T V W X Y 2 3 4 6 7 8 9 ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
37
|
1
|
|
|
1
|
|
4
|
use constant WIN_USER_INFO_LEVEL => 3; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
69
|
|
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
1
|
|
4
|
use constant DATE_WEEKDAYS => qw( Sun Mon Tue Wed Thu Fri Sat ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
40
|
1
|
|
|
1
|
|
4
|
use constant DATE_MONTHS => qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
41
|
1
|
|
|
1
|
|
4
|
use constant DATE_MKTIME_YDAY => 0; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
38
|
|
42
|
1
|
|
|
1
|
|
3
|
use constant DATE_MKTIME_ISDST => -1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
43
|
|
|
|
|
|
|
|
44
|
1
|
|
|
1
|
|
4
|
use constant UN_RE_BUILD => qr{\A Build \s+ (\d+) .* \z}xmsi; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
46
|
|
45
|
|
|
|
|
|
|
|
46
|
1
|
|
|
1
|
|
4
|
use constant NEW_PERL => $] >= 5.008; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
47
|
|
|
|
|
|
|
|
48
|
1
|
|
|
1
|
|
3
|
use constant USER_REAL_NAME_FIELD => 6; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
105
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
%EXPORT_TAGS = ( |
51
|
|
|
|
|
|
|
device_cpu => [qw/ |
52
|
|
|
|
|
|
|
DCPU_LOAD_LAST_01 |
53
|
|
|
|
|
|
|
DCPU_LOAD_LAST_05 |
54
|
|
|
|
|
|
|
DCPU_LOAD_LAST_10 |
55
|
|
|
|
|
|
|
DCPU_LOAD |
56
|
|
|
|
|
|
|
/], |
57
|
|
|
|
|
|
|
windows_reg => [qw/ |
58
|
|
|
|
|
|
|
WIN_REG_HW_KEY |
59
|
|
|
|
|
|
|
WIN_REG_CPU_KEY |
60
|
|
|
|
|
|
|
WIN_REG_CDKEY |
61
|
|
|
|
|
|
|
WIN_REG_OCDKEY |
62
|
|
|
|
|
|
|
/], |
63
|
|
|
|
|
|
|
windows_wmi => [qw/ |
64
|
|
|
|
|
|
|
WIN_WMI_DATE_TMPL |
65
|
|
|
|
|
|
|
/], |
66
|
|
|
|
|
|
|
windows_etc => [qw/ |
67
|
|
|
|
|
|
|
WIN_B24_DIGITS |
68
|
|
|
|
|
|
|
WIN_USER_INFO_LEVEL |
69
|
|
|
|
|
|
|
/], |
70
|
|
|
|
|
|
|
date => [qw/ |
71
|
|
|
|
|
|
|
DATE_WEEKDAYS |
72
|
|
|
|
|
|
|
DATE_MONTHS |
73
|
|
|
|
|
|
|
DATE_MKTIME_YDAY |
74
|
|
|
|
|
|
|
DATE_MKTIME_ISDST |
75
|
|
|
|
|
|
|
/], |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
unknown => [qw/ |
78
|
|
|
|
|
|
|
UN_RE_BUILD |
79
|
|
|
|
|
|
|
/], |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
general => [qw/ |
82
|
|
|
|
|
|
|
OSID |
83
|
|
|
|
|
|
|
NEW_PERL |
84
|
|
|
|
|
|
|
USER_REAL_NAME_FIELD |
85
|
|
|
|
|
|
|
/], |
86
|
|
|
|
|
|
|
); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
@EXPORT_OK = map { @{ $_ } } values %EXPORT_TAGS; |
89
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = \@EXPORT_OK; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
__END__ |