line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Password::Policy::Rule::Length; |
2
|
|
|
|
|
|
|
$Password::Policy::Rule::Length::VERSION = '0.04'; |
3
|
3
|
|
|
3
|
|
21808
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
129
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
97
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
771
|
use parent 'Password::Policy::Rule'; |
|
3
|
|
|
|
|
421
|
|
|
3
|
|
|
|
|
16
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
1898
|
use String::Multibyte; |
|
3
|
|
|
|
|
12243
|
|
|
3
|
|
|
|
|
162
|
|
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
1510
|
use Password::Policy::Exception::InsufficientLength; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
330
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
0
|
15
|
sub default_arg { return 8; } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub check { |
15
|
18
|
|
|
18
|
0
|
170
|
my $self = shift; |
16
|
18
|
|
|
|
|
54
|
my $password = $self->prepare(shift); |
17
|
17
|
|
|
|
|
85
|
my $strmb = String::Multibyte->new('UTF8'); |
18
|
17
|
|
|
|
|
10568
|
my $len = $strmb->length($password); |
19
|
17
|
100
|
|
|
|
311
|
if($len < $self->arg) { |
20
|
4
|
|
|
|
|
26
|
Password::Policy::Exception::InsufficientLength->throw; |
21
|
|
|
|
|
|
|
} |
22
|
13
|
|
|
|
|
149
|
return 1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |