line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::Lite::Constraint; |
2
|
30
|
|
|
30
|
|
92
|
use strict; |
|
30
|
|
|
|
|
29
|
|
|
30
|
|
|
|
|
600
|
|
3
|
30
|
|
|
30
|
|
91
|
use warnings; |
|
30
|
|
|
|
|
167
|
|
|
30
|
|
|
|
|
1003
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub import { |
6
|
40
|
|
|
40
|
|
141
|
strict->import; |
7
|
40
|
|
|
|
|
330
|
warnings->import; |
8
|
|
|
|
|
|
|
|
9
|
30
|
|
|
30
|
|
86
|
no strict 'refs'; |
|
30
|
|
|
|
|
40
|
|
|
30
|
|
|
|
|
6009
|
|
10
|
40
|
|
|
|
|
62
|
my $pkg = caller(0); |
11
|
40
|
|
|
|
|
62
|
*{"$pkg\::rule"} = \&rule; |
|
40
|
|
|
|
|
193
|
|
12
|
40
|
|
|
|
|
56
|
*{"$pkg\::file_rule"} = \&file_rule; |
|
40
|
|
|
|
|
123
|
|
13
|
40
|
|
|
|
|
49
|
*{"$pkg\::alias"} = \&alias; |
|
40
|
|
|
|
|
116
|
|
14
|
40
|
|
|
|
|
49
|
*{"$pkg\::delsp"} = \&delsp; |
|
40
|
|
|
|
|
19386
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub rule { |
18
|
375
|
|
|
375
|
1
|
356
|
my ($name, $code) = @_; |
19
|
375
|
|
|
|
|
744
|
$FormValidator::Lite::Rules->{$name} = $code; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
sub file_rule { |
22
|
6
|
|
|
6
|
1
|
9
|
my ($name, $code) = @_; |
23
|
6
|
|
|
|
|
14
|
$FormValidator::Lite::FileRules->{$name} = $code; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
sub alias { |
26
|
150
|
|
|
150
|
1
|
128
|
my ($from, $to) = @_; |
27
|
150
|
|
|
|
|
281
|
$FormValidator::Lite::Rules->{$to} = $FormValidator::Lite::Rules->{$from}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
sub delsp { |
30
|
8
|
|
|
8
|
1
|
9
|
my $x = $_; |
31
|
8
|
|
|
|
|
17
|
$x =~ s/\s//g; |
32
|
8
|
|
|
|
|
49
|
return $x; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |