line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbld::Target::Attribute::PatchFiles; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
7145
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
65
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
143
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
836
|
use parent qw/Enbld::Target::AttributeExtension::URL/; |
|
2
|
|
|
|
|
379
|
|
|
2
|
|
|
|
|
18
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub validate { |
11
|
57
|
|
|
57
|
0
|
134
|
my ( $self, $value ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
57
|
100
|
|
|
|
167
|
unless ( ref( $value ) eq 'ARRAY' ) { |
14
|
2
|
|
|
|
|
4
|
my $type = ref( $self ); |
15
|
2
|
|
|
|
|
10
|
$type =~ s/.*:://; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
4
|
my $err = "Attribute 'PatchFiles' isn't ARRAY reference"; |
18
|
2
|
|
|
|
|
12
|
require Enbld::Exception; |
19
|
2
|
|
|
|
|
10
|
croak( Enbld::Exception->new( $err, $value )); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
55
|
|
|
|
|
73
|
foreach my $string ( @{ $value } ) { |
|
55
|
|
|
|
|
401
|
|
23
|
53
|
|
|
|
|
250
|
$self->SUPER::validate( $string ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
54
|
|
|
|
|
164
|
return $value; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub to_value { |
30
|
66
|
|
|
66
|
0
|
112
|
my $self = shift; |
31
|
|
|
|
|
|
|
|
32
|
66
|
|
|
|
|
390
|
my $value = $self->evaluate; |
33
|
|
|
|
|
|
|
|
34
|
66
|
100
|
|
|
|
289
|
return [] if ( ! defined $value ); |
35
|
|
|
|
|
|
|
|
36
|
57
|
|
|
|
|
148
|
$self->validate( $value ); |
37
|
|
|
|
|
|
|
|
38
|
54
|
|
|
|
|
269
|
return $value; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |