line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Password::Policy::Rule::Whitespace; |
2
|
|
|
|
|
|
|
$Password::Policy::Rule::Whitespace::VERSION = '0.04'; |
3
|
1
|
|
|
1
|
|
17850
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
400
|
use parent 'Password::Policy::Rule'; |
|
1
|
|
|
|
|
229
|
|
|
1
|
|
|
|
|
3
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
366
|
use Password::Policy::Exception::InsufficientWhitespace; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
85
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub check { |
11
|
6
|
|
|
6
|
0
|
117
|
my $self = shift; |
12
|
6
|
|
|
|
|
18
|
my $password = $self->prepare(shift); |
13
|
5
|
|
|
|
|
22
|
my @whitespace = ($password =~ m/\s/g); |
14
|
5
|
|
|
|
|
6
|
my $count = scalar @whitespace; |
15
|
5
|
100
|
|
|
|
12
|
if($count < $self->arg) { |
16
|
2
|
|
|
|
|
10
|
Password::Policy::Exception::InsufficientWhitespace->throw; |
17
|
|
|
|
|
|
|
} |
18
|
3
|
|
|
|
|
21
|
return 1; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |