lib/Mojolicious/Plugin/Vparam/Numbers.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 47 | 60 | 78.3 |
line | true | false | branch |
---|---|---|---|
6 | 104 | 142 | unless defined $_[0] |
7 | 0 | 142 | unless length $_[0] |
12 | 9 | 64 | unless defined $_[0] |
13 | 0 | 64 | unless length $_[0] |
18 | 0 | 9 | unless defined $_[0] |
19 | 0 | 9 | unless length $_[0] |
22 | 0 | 9 | if $numeric |
24 | 1 | 8 | if $_[0] =~ /\./ and not $_[0] =~ /\.\d{0,2}$/ |
30 | 0 | 5 | unless defined $_[0] |
31 | 0 | 5 | unless length $_[0] |
34 | 0 | 5 | if $numeric |
36 | 1 | 4 | unless $_[0] >= 0 |
37 | 1 | 3 | unless $_[0] <= 100 |
42 | 0 | 12 | unless defined $_[0] |
45 | 0 | 12 | if $numeric |
47 | 1 | 11 | unless $_[0] >= -180 |
48 | 1 | 10 | unless $_[0] <= 180 |
53 | 0 | 12 | unless defined $_[0] |
56 | 0 | 12 | if $numeric |
58 | 1 | 11 | unless $_[0] >= -90 |
59 | 1 | 10 | unless $_[0] <= 90 |
65 | 36 | 210 | unless defined $str |
72 | 0 | 33 | unless defined $str |
83 | 2 | 31 | unless defined $number |
95 | 154 | 82 | defined $_[1] ? : |
101 | 9 | 2 | defined $_[1] ? : |
110 | 8 | 1 | defined $_[1] ? : |
117 | 3 | 2 | defined $_[1] ? : |
124 | 2 | 2 | defined $_[1] ? : |
131 | 2 | 2 | defined $_[1] ? : |