Passphrase/Fallback.pm

filter: Statementstmt 61.1% 11 / 18 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 42.8% 3 / 7 Podpod 66.6% 2 / 3 totaltotal 48.4% 16 / 33 CC 2 SCAR 9.7
CC
2
Cov
52%
new
6.0
__ANON__
2.0
accepts_hash
2.0
CRAP 2.6
« Passphrase/Pepper/Base.pm ↑ Summary Passphrase/Util/Crypt64.pm »
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; }
l!l&&r!l&&!r
000
MC/DC0%0/2
$args{"acceptor"} // sub { 1; }
$args{"acceptor"} sub { 1; }
Truth table0%0/3
A // B
A= $args{"acceptor"}B= sub { 1; }
ABresult
1X1
011
000
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__
« Passphrase/Pepper/Base.pm ↑ Summary Passphrase/Util/Crypt64.pm »