Branch Coverage

lib/Mojolicious/Plugin/Vparam/RU.pm
Criterion Covered Total %
branch 17 20 85.0


line true false branch
6 0 7 unless defined $_[0]
7 1 6 unless length $_[0]
8 2 4 unless $_[0] =~ /^(?:\d{10}|\d{12})$/
11 2 2 if (@str == 10) { }
2 0 elsif (@str == 12) { }
12 1 1 unless $str[9] eq (2 * $str[0] + 4 * $str[1] + 10 * $str[2] + 3 * $str[3] + 5 * $str[4] + 9 * $str[5] + 4 * $str[6] + 6 * $str[7] + 8 * $str[8]) % 11 % 10
21 1 1 unless $str[10] eq (7 * $str[0] + 2 * $str[1] + 4 * $str[2] + 10 * $str[3] + 3 * $str[4] + 5 * $str[5] + 9 * $str[6] + 4 * $str[7] + 6 * $str[8] + 8 * $str[9]) % 11 % 10 and $str[11] eq (3 * $str[0] + 7 * $str[1] + 2 * $str[2] + 4 * $str[3] + 10 * $str[4] + 3 * $str[5] + 5 * $str[6] + 9 * $str[7] + 4 * $str[8] + 6 * $str[9] + 8 * $str[10]) % 11 % 10
40 0 4 unless defined $_[0]
41 1 3 unless length $_[0]
42 2 1 unless $_[0] =~ /^\d{9}$/