Policy/Rule/Uppercase.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/Rule/Numbers.pm ↑ Summary Policy/Rule/Whitespace.pm »
1 package Password::Policy::Rule::Uppercase;
2 2 $Password::Policy::Rule::Uppercase::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::InsufficientUppercase;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 11 ▶sub check {
Subroutine check: called CC=2 SCAR=6.9
Pod undocumented
11 11 my $self = shift;
12 11 my $password = $self->prepare(shift);
13 10 my @uppercase = ($password =~ m/[A-Z]/g);
14 10 my $count = scalar @uppercase;
15 10 ▶ if($count < $self->arg) {
Branch: 1 branch
BranchTrueFalseTotal
if ($count < $self->arg) 5 5 10
16 5 Password::Policy::Exception::InsufficientUppercase->throw;
17 }
18 5 return 1;
19 }
20  
21 2 1;
22  
23 __END__
« Policy/Rule/Numbers.pm ↑ Summary Policy/Rule/Whitespace.pm »