DJabberd/Authen/StaticPassword.pm

filter: Statementstmt 58.8% 10 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 4 totaltotal 48.2% 14 / 29 CC 2 SCAR 9.4
CC
2
Cov
53%
check_cleartext
6.0
get_password
2.0
BEGIN
1.0
CRAP 2.6
« DJabberd/Component/Example.pm ↑ Summary DJabberd/ClusterMessage.pm »
1 package DJabberd::Authen::StaticPassword;
2 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 17 ▶use base 'DJabberd::Authen';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub set_config_password {
6 36 ▶ my ($self, $pass) = @_;
Subroutine set_config_password: called CC=1 SCAR=0.0
Pod undocumented
7 36 $self->{password} = $pass;
8 }
9  
10 36 ▶sub can_retrieve_cleartext { 1 }
Subroutine can_retrieve_cleartext: called CC=1 SCAR=0.0
Pod undocumented
11  
12 sub get_password {
13 0 ▶ my ($self, $cb, %args) = @_;
Subroutine get_password: not called CC=1 SCAR=6.9
Pod undocumented
14 0 $cb->set($self->{password});
15 }
16  
17 sub check_cleartext {
18 0 ▶ my ($self, $cb, %args) = @_;
Subroutine check_cleartext: not called CC=2 SCAR=17.9
Pod undocumented
19 0 ▶ if ($args{password} eq $self->{password}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($args{"password"} eq $self->{"password"}) 0 0 0
20 0 $cb->accept;
21 0 return;
22 }
23 0 $cb->reject;
24 }
25  
26 17 1;
« DJabberd/Component/Example.pm ↑ Summary DJabberd/ClusterMessage.pm »