QBit/Validator/Type/palindrome.pm untested

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