blib/lib/Badger/Data/Facet/Text/MinLength.pm untested

filter: Statementstmt 0.0% 0 / 6 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 14 CC 1 SCAR 6.9
CC
1
Cov
0%
validate
2.0
BEGIN
2.0
CRAP 2.0
1 package Badger::Data::Facet::Text::MinLength;
2  
3 use Badger::Data::Facet::Class
4 version => 0.01,
5 type => 'text',
6 args => 'min_length';
7  
8  
9 sub validate {
10 my ($self, $text, $type) = @_;
11  
12 return length($$text) >= $self->{ min_length }
13 || $self->invalid_msg(
14 too_short => $type || 'Text', $self->{ min_length }, length($$text)
15 );
16 }
17  
18 1;
19  
20 __END__