line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbld::Target::Attribute::CopyFiles; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3102
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
7
|
use parent qw/Enbld::Target::Attribute/; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub validate { |
11
|
0
|
|
|
0
|
0
|
0
|
my ( $self, $value ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
0
|
|
|
|
0
|
unless ( ref( $value ) eq 'ARRAY' ) { |
14
|
0
|
|
|
|
|
0
|
my $type = ref( $self ); |
15
|
0
|
|
|
|
|
0
|
$type =~ s/.*:://; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
0
|
my $err = "Attribute 'CopyFiles' isn't ARRAY reference"; |
18
|
0
|
|
|
|
|
0
|
require Enbld::Exception; |
19
|
0
|
|
|
|
|
0
|
croak( Enbld::Exception->new( $err, $value )); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
0
|
foreach my $string ( @{ $value } ) { |
|
0
|
|
|
|
|
0
|
|
23
|
0
|
|
|
|
|
0
|
$self->SUPER::validate( $string ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
0
|
return $value; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub to_value { |
30
|
26
|
|
|
26
|
0
|
170
|
my $self = shift; |
31
|
|
|
|
|
|
|
|
32
|
26
|
|
|
|
|
459
|
my $value = $self->evaluate; |
33
|
|
|
|
|
|
|
|
34
|
26
|
50
|
|
|
|
322
|
return [] if ( ! defined $value ); |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
$self->validate( $value ); |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
return $value; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |