blib/lib/Cassandra/Client/Policy/Auth/Password.pm

filter: Statementstmt 45.8% 11 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 4 totaltotal 35.9% 14 / 39 CC 3 SCAR 16.1
CC
3
Cov
39%
evaluate
12.0
new
2.0
begin
2.0
CRAP 5.0
« blib/lib/Cassandra/Client/Metadata.pm ↑ Summary blib/lib/Cassandra/Client/Util.pm »
1 package Cassandra::Client::Policy::Auth::Password;
2 13 our $AUTHORITY = 'cpan:TVDW';
3 13 $Cassandra::Client::Policy::Auth::Password::VERSION = '0.21';
4 13 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
9 0 my ($class, %args)= @_;
10  
11 0 my $username= delete $args{username};
12 0 my $password= delete $args{password};
13  
14 0 return bless {
15 username => $username,
16 password => $password,
17 }, $class;
18 }
19  
20 0 ▶sub begin {
Subroutine begin: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my ($self)= @_;
22 0 return $self; # We are not a stateful implementation
23 }
24  
25 0 ▶sub evaluate {
Subroutine evaluate: not called CC=3 SCAR=24.8
Pod undocumented
26 0 my ($self, $callback, $challenge)= @_;
27 0 my $user= $self->{username};
28 0 my $pass= $self->{password};
29 0 ▶ utf8::encode($user) if utf8::is_utf8($user);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($user) 0 0 0
30 0 ▶ utf8::encode($pass) if utf8::is_utf8($pass);
Branch: 1 branch
BranchTrueFalseTotal
if utf8::is_utf8($pass) 0 0 0
31 0 return $callback->(undef, "\0$user\0$pass");
32 }
33  
34 0 ▶sub success {
Subroutine success: not called CC=1 SCAR=6.9
Pod undocumented
35 0 my ($self)= @_;
36 # Ignored
37 }
38  
39 13 1;
40  
41 __END__
« blib/lib/Cassandra/Client/Metadata.pm ↑ Summary blib/lib/Cassandra/Client/Util.pm »