line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::LazyWay::Rule::Object; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
209277
|
use strict; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
289
|
|
4
|
8
|
|
|
8
|
|
43
|
use warnings; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
194
|
|
5
|
8
|
|
|
8
|
|
4290
|
use utf8; |
|
8
|
|
|
|
|
50
|
|
|
8
|
|
|
|
|
47
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub boolean { |
8
|
4
|
|
|
4
|
1
|
14993
|
my $bool = shift; |
9
|
4
|
100
|
|
|
|
19
|
return 0 unless defined $bool; |
10
|
3
|
100
|
|
|
|
17
|
return $bool =~ /^[01]$/ ? 1 : 0 ; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub regexp { |
14
|
2
|
|
|
2
|
1
|
14297
|
my $text = shift; |
15
|
2
|
|
|
|
|
5
|
my $args = shift; |
16
|
2
|
50
|
|
|
|
10
|
die 'please set format' unless $args->{format}; |
17
|
2
|
50
|
|
|
|
55
|
return $text =~ m/$args->{format}/ ? 1 : 0 ; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub true { |
21
|
11
|
|
|
11
|
1
|
13792
|
return 1; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |