LazyWay/Rule/Email.pm

filter: Statementstmt 80.9% 17 / 21 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 100% 2 / 2 totaltotal 78.7% 26 / 33 CC 3 SCAR 9.2
CC
3
Cov
76%
email_loose
6.0
email
2.0
BEGIN
1.0
CRAP 2.5
« LazyWay/Result.pm ↑ Summary LazyWay/Rule/Number.pm »
1 package FormValidator::LazyWay::Rule::Email;
2  
3 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 10 ▶use Email::Valid;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 10 ▶use Email::Valid::Loose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶sub email {
Subroutine email: called CC=2 SCAR=6.9
Pod documented
9 4 my $text = shift;
10 4 my $args = shift;
11  
12 4 ▶ return Email::Valid->address( -address => $text, %{$args} ) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
'Email::Valid'->address('-address', $text, %{$args;}) ? : 2 2 4
13 }
14  
15 0 ▶sub email_loose {
Subroutine email_loose: not called CC=2 SCAR=17.9
Pod documented
16 0 my $text = shift;
17 0 my $args = shift;
18  
19 0 ▶ return Email::Valid::Loose->address( -address => $text, %{$args} ) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
'Email::Valid::Loose'->address('-address', $text, %{$args;}) ? : 0 0 0
20 }
21  
22 10 1;
23  
24 =head1 NAME
25  
26 FormValidator::LazyWay::Rule::Email - Email Rule
27  
28 =head1 METHOD
29  
30 =head2 email
31  
32 =head2 email_loose
33  
34 =cut
35  
« LazyWay/Result.pm ↑ Summary LazyWay/Rule/Number.pm »