| 1 | package Crypt::Passphrase::Fallback; | ||||||||||||||||||||
| 2 | 1 | $Crypt::Passphrase::Fallback::VERSION = '0.024'; | |||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | ▶ | use parent 'Crypt::Passphrase::Validator'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 9 | 0 | my ($class, %args) = @_; | |||||||||||||||||||
| 10 | return bless { | ||||||||||||||||||||
| 11 | callback => $args{callback}, | ||||||||||||||||||||
| 12 | 0 | ▶ | acceptor => $args{acceptor} // sub { 1 }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 13 | 0 | ▶ | }, $class; | ||||||||||||||||||
|
Condition0%0/3
$args{"acceptor"} // sub {
1;
}
MC/DC0%0/2
$args{"acceptor"} // sub {
1;
}
$args{"acceptor"}
sub {
1;
}
Truth table0%0/3
A // B
A= $args{"acceptor"}B= sub {
1;
}
| |||||||||||||||||||||
| 14 | } | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 0 | ▶ | sub accepts_hash { | ||||||||||||||||||
|
Subroutine
accepts_hash: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 17 | 0 | my ($self, $hash) = @_; | |||||||||||||||||||
| 18 | 0 | return $self->{acceptor}->($hash); | |||||||||||||||||||
| 19 | } | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 0 | ▶ | sub verify_password { | ||||||||||||||||||
|
Subroutine
verify_password: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 22 | 0 | my ($self, $password, $hash) = @_; | |||||||||||||||||||
| 23 | 0 | return $self->{callback}->($password, $hash); | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 1 | 1; | |||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | #ABSTRACT: a fallback validator for Crypt::Passphrase | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||