line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::Maker::Option::Meta; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
60
|
use utf8; |
|
9
|
|
|
|
|
51
|
|
|
9
|
|
|
|
|
83
|
|
4
|
9
|
|
|
9
|
|
267
|
use warnings; |
|
9
|
|
|
|
|
23
|
|
|
9
|
|
|
|
|
306
|
|
5
|
9
|
|
|
9
|
|
54
|
use strict; |
|
9
|
|
|
|
|
22
|
|
|
9
|
|
|
|
|
302
|
|
6
|
|
|
|
|
|
|
|
7
|
9
|
|
|
9
|
|
52
|
use Carp; |
|
9
|
|
|
|
|
17
|
|
|
9
|
|
|
|
|
807
|
|
8
|
|
|
|
|
|
|
|
9
|
9
|
|
|
9
|
|
58
|
use Config::Maker::Option; |
|
9
|
|
|
|
|
20
|
|
|
9
|
|
|
|
|
255
|
|
10
|
9
|
|
|
9
|
|
49
|
use Config::Maker::Type; |
|
9
|
|
|
|
|
106
|
|
|
9
|
|
|
|
|
3739
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Config::Maker::Option); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub set { |
14
|
135
|
|
|
135
|
0
|
495
|
my ($self, $value) = @_; |
15
|
135
|
100
|
|
|
|
668
|
if(UNIVERSAL::isa($value, 'Config::Maker::Option')) { |
16
|
90
|
|
|
|
|
306
|
$self->{-value} = $value->{-value}; |
17
|
90
|
|
|
|
|
308
|
$self->{-children} = $value->{-children}; |
18
|
90
|
|
|
|
|
282
|
$self->{-parent} = $value->{-parent}; |
19
|
|
|
|
|
|
|
} else { |
20
|
45
|
|
|
|
|
151
|
$self->{-value} = $value; |
21
|
45
|
|
|
|
|
147
|
$self->{-children} = []; |
22
|
45
|
|
|
|
|
153
|
$self->{-parent} = undef; # FIXME This is a bit bogus... |
23
|
|
|
|
|
|
|
} |
24
|
135
|
|
|
|
|
772
|
$self; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub set_child { |
28
|
135
|
|
|
135
|
0
|
279
|
my ($self, $name, $value) = @_; |
29
|
135
|
|
|
|
|
489
|
my $child = $self->get($name); |
30
|
135
|
50
|
|
|
|
457
|
unless(defined $child) { # No, we don't have that child... |
31
|
135
|
|
|
|
|
623
|
my $type = Config::Maker::Type->meta->get($name); |
32
|
135
|
|
|
|
|
1040
|
$child = ref($self)->new(-type => $type, -value => $value); |
33
|
135
|
|
|
|
|
280
|
push @{$self->{-children}}, $child; |
|
135
|
|
|
|
|
398
|
|
34
|
135
|
|
|
|
|
415
|
$child->{-parent} = $self; |
35
|
|
|
|
|
|
|
} |
36
|
135
|
|
|
|
|
446
|
$child->set($value); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |