| 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
| |||||||||||
| 16 | 3 | Password::Policy::Exception::InsufficientLowercase->throw; | |||||||||
| 17 | } | ||||||||||
| 18 | 5 | return 1; | |||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 2 | 1; | |||||||||
| 22 | |||||||||||
| 23 | __END__ | ||||||||||