line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::Lite::Constraint; |
2
|
30
|
|
|
30
|
|
127
|
use strict; |
|
30
|
|
|
|
|
47
|
|
|
30
|
|
|
|
|
938
|
|
3
|
30
|
|
|
30
|
|
129
|
use warnings; |
|
30
|
|
|
|
|
222
|
|
|
30
|
|
|
|
|
1470
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub import { |
6
|
40
|
|
|
40
|
|
398
|
strict->import; |
7
|
40
|
|
|
|
|
382
|
warnings->import; |
8
|
|
|
|
|
|
|
|
9
|
30
|
|
|
30
|
|
138
|
no strict 'refs'; |
|
30
|
|
|
|
|
39
|
|
|
30
|
|
|
|
|
6738
|
|
10
|
40
|
|
|
|
|
70
|
my $pkg = caller(0); |
11
|
40
|
|
|
|
|
72
|
*{"$pkg\::rule"} = \&rule; |
|
40
|
|
|
|
|
226
|
|
12
|
40
|
|
|
|
|
69
|
*{"$pkg\::file_rule"} = \&file_rule; |
|
40
|
|
|
|
|
143
|
|
13
|
40
|
|
|
|
|
67
|
*{"$pkg\::alias"} = \&alias; |
|
40
|
|
|
|
|
145
|
|
14
|
40
|
|
|
|
|
60
|
*{"$pkg\::delsp"} = \&delsp; |
|
40
|
|
|
|
|
23221
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub rule { |
18
|
375
|
|
|
375
|
1
|
395
|
my ($name, $code) = @_; |
19
|
375
|
|
|
|
|
940
|
$FormValidator::Lite::Rules->{$name} = $code; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
sub file_rule { |
22
|
6
|
|
|
6
|
1
|
10
|
my ($name, $code) = @_; |
23
|
6
|
|
|
|
|
17
|
$FormValidator::Lite::FileRules->{$name} = $code; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
sub alias { |
26
|
150
|
|
|
150
|
1
|
194
|
my ($from, $to) = @_; |
27
|
150
|
|
|
|
|
368
|
$FormValidator::Lite::Rules->{$to} = $FormValidator::Lite::Rules->{$from}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
sub delsp { |
30
|
8
|
|
|
8
|
1
|
8
|
my $x = $_; |
31
|
8
|
|
|
|
|
18
|
$x =~ s/\s//g; |
32
|
8
|
|
|
|
|
45
|
return $x; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |