Validator/Type/palindrome.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 22 CC 2 SCAR 12.0
CC
2
Cov
0%
get_template
6.0
_get_options
2.0
_get_options_name
2.0
CRAP 3.3
1 package QBit::Validator::Type::palindrome;
2 $QBit::Validator::Type::palindrome::VERSION = '0.009';
3 use qbit;
4  
5 use base qw(QBit::Validator::Type);
6  
7 sub _get_options {[]}
8  
9 sub _get_options_name {qw()}
10  
11 sub get_template {
12 return {
13 type => 'scalar',
14 len_min => 1,
15 check => sub {
16 throw FF gettext('String is not a palindrome') unless $_[1] eq reverse($_[1]);
17 },
18 }
19 }
20  
21 TRUE;