line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Cleaner::Enum; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
76
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
381
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.0.2; |
7
|
|
|
|
|
|
|
our $DEFAULT = ''; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub _validate { |
10
|
|
|
|
|
|
|
|
11
|
7
|
|
|
7
|
|
10
|
my ($self, $value) = @_; |
12
|
|
|
|
|
|
|
|
13
|
7
|
|
|
|
|
8
|
foreach my $opt (@{$self->get_enum_options}) { |
|
7
|
|
|
|
|
19
|
|
14
|
23
|
100
|
|
|
|
53
|
return $opt if ($opt eq $value); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
3
|
|
|
|
|
9
|
return undef; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _fix { |
22
|
1
|
|
|
1
|
|
6
|
return $_[0]->get_default; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _format { |
26
|
0
|
|
|
0
|
|
|
return $_[1]; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |