blib/lib/FormValidator/Lite/Constraint/Number.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 9 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 12 | 12 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package FormValidator::Lite::Constraint::Number; | ||||||
2 | 1 | 1 | 660 | use strict; | |||
1 | 2 | ||||||
1 | 36 | ||||||
3 | 1 | 1 | 4 | use warnings; | |||
1 | 1 | ||||||
1 | 28 | ||||||
4 | 1 | 1 | 4 | use FormValidator::Lite::Constraint; | |||
1 | 1 | ||||||
1 | 7 | ||||||
5 | |||||||
6 | rule BETWEEN => sub { | ||||||
7 | $_[0] <= $_ && $_ <= $_[1]; | ||||||
8 | }; | ||||||
9 | |||||||
10 | rule LESS_THAN => sub { | ||||||
11 | $_ < $_[0]; | ||||||
12 | }; | ||||||
13 | |||||||
14 | rule LESS_EQUAL => sub { | ||||||
15 | $_ <= $_[0]; | ||||||
16 | }; | ||||||
17 | |||||||
18 | rule MORE_THAN => sub { | ||||||
19 | $_[0] < $_; | ||||||
20 | }; | ||||||
21 | |||||||
22 | rule MORE_EQUAL => sub { | ||||||
23 | $_[0] <= $_; | ||||||
24 | }; | ||||||
25 | |||||||
26 | 1; | ||||||
27 | __END__ |