| 1 | package Password::Policy::Rule::Length; | ||||||||||
| 2 | 3 | $Password::Policy::Rule::Length::VERSION = '0.04'; | |||||||||
| 3 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use parent 'Password::Policy::Rule'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 3 | ▶ | use String::Multibyte; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 3 | ▶ | use Password::Policy::Exception::InsufficientLength; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | sub default_arg { return 8; } | ||||||||
|
Subroutine
default_arg: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 13 | |||||||||||
| 14 | sub check { | ||||||||||
| 15 | 18 | ▶ | my $self = shift; | ||||||||
|
Subroutine
check: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 16 | 18 | my $password = $self->prepare(shift); | |||||||||
| 17 | 17 | my $strmb = String::Multibyte->new('UTF8'); | |||||||||
| 18 | 17 | my $len = $strmb->length($password); | |||||||||
| 19 | 17 | ▶ | if($len < $self->arg) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 4 | Password::Policy::Exception::InsufficientLength->throw; | |||||||||
| 21 | } | ||||||||||
| 22 | 13 | return 1; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 3 | 1; | |||||||||
| 26 | |||||||||||
| 27 | __END__ | ||||||||||