line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbld::Target::Attribute::CommandTest; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2047
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use parent qw/Enbld::Target::AttributeExtension::Command/; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub initialize { |
9
|
46
|
|
|
46
|
0
|
108
|
my ( $self, $param ) = @_; |
10
|
|
|
|
|
|
|
|
11
|
46
|
50
|
|
|
|
146
|
if ( ! defined $param ) { |
12
|
46
|
|
|
|
|
288
|
my $make = $self->make_command; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
$self->{callback} = sub { |
15
|
1
|
|
|
1
|
|
4
|
my $attributes = shift; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
29
|
return $make . ' ' . $attributes->TestAction; |
18
|
46
|
|
|
|
|
289
|
}; |
19
|
|
|
|
|
|
|
|
20
|
46
|
|
|
|
|
159
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
0
|
if ( $param ) { |
24
|
0
|
|
|
|
|
0
|
$self->SUPER::initialize( $param ); |
25
|
0
|
|
|
|
|
0
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# empty string is valid |
29
|
0
|
|
|
|
|
0
|
$self->{is_evaluated}++; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub validate { |
33
|
2
|
|
|
2
|
0
|
4
|
my ( $self, $string ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# nothing check now. |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
|
|
6
|
return $string; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |