line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::Lite::Constraint; |
2
|
30
|
|
|
30
|
|
138
|
use strict; |
|
30
|
|
|
|
|
39
|
|
|
30
|
|
|
|
|
592
|
|
3
|
30
|
|
|
30
|
|
98
|
use warnings; |
|
30
|
|
|
|
|
44
|
|
|
30
|
|
|
|
|
1038
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub import { |
6
|
40
|
|
|
40
|
|
167
|
strict->import; |
7
|
40
|
|
|
|
|
368
|
warnings->import; |
8
|
|
|
|
|
|
|
|
9
|
30
|
|
|
30
|
|
124
|
no strict 'refs'; |
|
30
|
|
|
|
|
35
|
|
|
30
|
|
|
|
|
6280
|
|
10
|
40
|
|
|
|
|
84
|
my $pkg = caller(0); |
11
|
40
|
|
|
|
|
78
|
*{"$pkg\::rule"} = \&rule; |
|
40
|
|
|
|
|
203
|
|
12
|
40
|
|
|
|
|
72
|
*{"$pkg\::file_rule"} = \&file_rule; |
|
40
|
|
|
|
|
124
|
|
13
|
40
|
|
|
|
|
70
|
*{"$pkg\::alias"} = \&alias; |
|
40
|
|
|
|
|
120
|
|
14
|
40
|
|
|
|
|
64
|
*{"$pkg\::delsp"} = \&delsp; |
|
40
|
|
|
|
|
19437
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub rule { |
18
|
375
|
|
|
375
|
1
|
539
|
my ($name, $code) = @_; |
19
|
375
|
|
|
|
|
820
|
$FormValidator::Lite::Rules->{$name} = $code; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
sub file_rule { |
22
|
6
|
|
|
6
|
1
|
15
|
my ($name, $code) = @_; |
23
|
6
|
|
|
|
|
16
|
$FormValidator::Lite::FileRules->{$name} = $code; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
sub alias { |
26
|
150
|
|
|
150
|
1
|
198
|
my ($from, $to) = @_; |
27
|
150
|
|
|
|
|
290
|
$FormValidator::Lite::Rules->{$to} = $FormValidator::Lite::Rules->{$from}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
sub delsp { |
30
|
8
|
|
|
8
|
1
|
9
|
my $x = $_; |
31
|
8
|
|
|
|
|
18
|
$x =~ s/\s//g; |
32
|
8
|
|
|
|
|
46
|
return $x; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |