File Coverage

blib/lib/Data/RuledValidator/Plugin/Email.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Data::RuledValidator::Plugin::Email;
2              
3             our $VERSION = '0.03';
4              
5 5     5   30 use Email::Valid;
  5         14  
  5         66  
6              
7             Data::RuledValidator->add_condition_operator
8             (
9             'mail' => sub{my($self, $v) = @_; return Email::Valid->address($v) ? 1 : ()},
10             );
11              
12             1;
13             __END__