Policy/Rule/Lowercase.pm

filter: Statementstmt 100% 21 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.5% 28 / 29 CC 2 SCAR 2.9
CC
2
Cov
100%
check
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Policy/Encryption.pm ↑ Summary Policy/Rule/Numbers.pm »
1 package Password::Policy::Rule::Lowercase;
2 2 $Password::Policy::Rule::Lowercase::VERSION = '0.06';
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use parent 'Password::Policy::Rule';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Password::Policy::Exception::InsufficientLowercase;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 9 ▶sub check {
Subroutine check: called CC=2 SCAR=6.9
Pod undocumented
11 9 my $self = shift;
12 9 my $password = $self->prepare(shift);
13 8 my @lowercase = ($password =~ m/[a-z]/g);
14 8 my $count = scalar @lowercase;
15 8 ▶ if($count < $self->arg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($count < $self->arg) 3 5 8
16 3 Password::Policy::Exception::InsufficientLowercase->throw;
17 }
18 5 return 1;
19 }
20  
21 2 1;
22  
23 __END__
« Policy/Encryption.pm ↑ Summary Policy/Rule/Numbers.pm »