QBit/Validator/Type/palindrome.pm untested

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