| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package DMOSS::Attr; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: DMOSS attribute object |
|
3
|
|
|
|
|
|
|
$DMOSS::Attr::VERSION = '0.01_2'; |
|
4
|
3
|
|
|
3
|
|
20826
|
use strict; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
117
|
|
|
5
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
1123
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
|
8
|
1
|
|
|
1
|
1
|
730
|
my ($class, $file, $plugin, $name, $value) = @_; |
|
9
|
1
|
|
|
|
|
4
|
my $self = bless({}, $class); |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
50
|
|
|
|
5
|
$self->file($file) if $file; |
|
12
|
1
|
50
|
|
|
|
4
|
$self->plugin($plugin) if $plugin; |
|
13
|
1
|
50
|
|
|
|
8
|
$self->name($name) if $name; |
|
14
|
1
|
50
|
|
|
|
4
|
$self->value($value) if $value; |
|
15
|
1
|
50
|
|
|
|
6
|
$self->value({}) unless $self->value; |
|
16
|
1
|
50
|
|
|
|
4
|
$self->type(ref($value)) if $value; |
|
17
|
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
3
|
return $self; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub file { |
|
22
|
0
|
|
|
0
|
1
|
0
|
my ($self, $file) = @_; |
|
23
|
0
|
0
|
|
|
|
0
|
$self->{file} = $file if $file; |
|
24
|
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
0
|
return $self->{file}; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub plugin { |
|
29
|
0
|
|
|
0
|
1
|
0
|
my ($self, $plugin) = @_; |
|
30
|
0
|
0
|
|
|
|
0
|
$self->{plugin} = $plugin if $plugin; |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
0
|
return $self->{plugin}; |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub name { |
|
36
|
0
|
|
|
0
|
1
|
0
|
my ($self, $name) = @_; |
|
37
|
0
|
0
|
|
|
|
0
|
$self->{name} = $name if $name; |
|
38
|
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
0
|
return $self->{name}; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub value { |
|
43
|
2
|
|
|
2
|
1
|
5
|
my ($self, $value) = @_; |
|
44
|
2
|
100
|
|
|
|
7
|
$self->{value} = $value if $value; |
|
45
|
|
|
|
|
|
|
|
|
46
|
2
|
|
|
|
|
9
|
return $self->{value}; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub type { |
|
50
|
0
|
|
|
0
|
1
|
|
my ($self, $type) = @_; |
|
51
|
0
|
0
|
|
|
|
|
$self->{type} = $type if $type; |
|
52
|
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
return $self->{type}; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |