line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Dist::Inno::Registry; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
48670
|
use 5.006; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
100
|
|
4
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
332
|
|
5
|
2
|
|
|
2
|
|
30
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
80
|
|
6
|
2
|
|
|
2
|
|
11
|
use Carp qw{ croak }; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
202
|
|
7
|
2
|
|
|
2
|
|
1087
|
use Params::Util qw{ _IDENTIFIER _STRING }; |
|
2
|
|
|
|
|
8094
|
|
|
2
|
|
|
|
|
154
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
14
|
use vars qw{$VERSION}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
264
|
|
10
|
|
|
|
|
|
|
BEGIN { |
11
|
2
|
|
|
2
|
|
54
|
$VERSION = '1.16'; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
15
|
use Object::Tiny qw{ |
15
|
|
|
|
|
|
|
root |
16
|
|
|
|
|
|
|
subkey |
17
|
|
|
|
|
|
|
value_type |
18
|
|
|
|
|
|
|
value_name |
19
|
|
|
|
|
|
|
value_data |
20
|
2
|
|
|
2
|
|
1217
|
}; |
|
2
|
|
|
|
|
370
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
##################################################################### |
27
|
|
|
|
|
|
|
# Constructors |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub new { |
30
|
1
|
|
|
1
|
0
|
11
|
my $self = shift->SUPER::new(@_); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Apply defaults |
33
|
1
|
50
|
|
|
|
45
|
unless ( defined $self->root ) { |
34
|
1
|
|
|
|
|
14
|
$self->{root} = 'HKLM'; |
35
|
|
|
|
|
|
|
} |
36
|
1
|
50
|
|
|
|
27
|
unless ( defined $self->value_type ) { |
37
|
1
|
|
|
|
|
9
|
$self->{value_type} = 'expandsz'; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# Check params |
41
|
1
|
50
|
|
|
|
23
|
unless ( _IDENTIFIER($self->root) ) { |
42
|
0
|
|
|
|
|
0
|
croak("Missing or invalid root param"); |
43
|
|
|
|
|
|
|
} |
44
|
1
|
50
|
|
|
|
67
|
unless ( _STRING($self->subkey) ) { |
45
|
0
|
|
|
|
|
0
|
croak("Missing or invalid subkey param"); |
46
|
|
|
|
|
|
|
} |
47
|
1
|
50
|
|
|
|
30
|
unless ( _IDENTIFIER($self->value_type) ) { |
48
|
0
|
|
|
|
|
0
|
croak("Missing or invalid value_type param"); |
49
|
|
|
|
|
|
|
} |
50
|
1
|
50
|
|
|
|
57
|
unless ( _IDENTIFIER($self->value_name) ) { |
51
|
0
|
|
|
|
|
0
|
croak("Missing or invalid value_name param"); |
52
|
|
|
|
|
|
|
} |
53
|
1
|
50
|
|
|
|
104
|
unless ( _STRING($self->value_data) ) { |
54
|
0
|
|
|
|
|
0
|
croak("Missing or invalid value_data param"); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
1
|
|
|
|
|
11
|
return $self; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# Shortcut constructor for an environment variable |
61
|
|
|
|
|
|
|
sub env { |
62
|
1
|
|
|
1
|
0
|
18
|
return $_[0]->new( |
63
|
|
|
|
|
|
|
subkey => 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', |
64
|
|
|
|
|
|
|
value_name => $_[1], |
65
|
|
|
|
|
|
|
value_data => $_[2], |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
##################################################################### |
74
|
|
|
|
|
|
|
# Main Methods |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub as_string { |
77
|
1
|
|
|
1
|
0
|
4161
|
my $self = shift; |
78
|
1
|
|
|
|
|
32
|
return join( '; ', |
79
|
|
|
|
|
|
|
"Root: " . $self->root, |
80
|
|
|
|
|
|
|
"Subkey: " . $self->subkey, |
81
|
|
|
|
|
|
|
"ValueType: " . $self->value_type, |
82
|
|
|
|
|
|
|
"ValueName: " . $self->value_name, |
83
|
|
|
|
|
|
|
"ValueData: " . '"' . $self->value_data . '"', |
84
|
|
|
|
|
|
|
); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
1; |