line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbld::Target::Attribute::PatchFiles; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
5303
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
66
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
7
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
132
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
464
|
use parent qw/Enbld::Target::AttributeExtension::URL/; |
|
2
|
|
|
|
|
295
|
|
|
2
|
|
|
|
|
10
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub validate { |
11
|
57
|
|
|
57
|
0
|
78
|
my ( $self, $value ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
57
|
100
|
|
|
|
145
|
unless ( ref( $value ) eq 'ARRAY' ) { |
14
|
2
|
|
|
|
|
3
|
my $type = ref( $self ); |
15
|
2
|
|
|
|
|
8
|
$type =~ s/.*:://; |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
|
|
4
|
my $err = "Attribute 'PatchFiles' isn't ARRAY reference"; |
18
|
2
|
|
|
|
|
10
|
require Enbld::Exception; |
19
|
2
|
|
|
|
|
11
|
croak( Enbld::Exception->new( $err, $value )); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
55
|
|
|
|
|
57
|
foreach my $string ( @{ $value } ) { |
|
55
|
|
|
|
|
127
|
|
23
|
53
|
|
|
|
|
196
|
$self->SUPER::validate( $string ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
54
|
|
|
|
|
78
|
return $value; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub to_value { |
30
|
66
|
|
|
66
|
0
|
76
|
my $self = shift; |
31
|
|
|
|
|
|
|
|
32
|
66
|
|
|
|
|
304
|
my $value = $self->evaluate; |
33
|
|
|
|
|
|
|
|
34
|
66
|
100
|
|
|
|
193
|
return [] if ( ! defined $value ); |
35
|
|
|
|
|
|
|
|
36
|
57
|
|
|
|
|
119
|
$self->validate( $value ); |
37
|
|
|
|
|
|
|
|
38
|
54
|
|
|
|
|
240
|
return $value; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |