blib/lib/WWW/JSON/Role/Authentication/Header.pm

filter: Statementstmt 60.0% 6 / 10 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod n/a totaltotal 46.6% 7 / 15 SCAR 9.2
CC
2
Cov
50%
_validate_Header
6.0
_auth_Header
2.0
BEGIN
1.0
CRAP 2.5
« blib/lib/WWW/JSON/Role/Authentication/Basic.pm ↑ Summary blib/lib/WWW/JSON/Role/Authentication/OAuth2.pm »
1 package WWW::JSON::Role::Authentication::Header;
2 8 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 8 requires 'authentication';
4 8 requires 'ua';
5  
6 sub _validate_Header {
7 0 ▶ my ( $self, $auth ) = @_;
Subroutine _validate_Header: not called CC=2 SCAR=17.9
8 0 ▶ die "Required header string missing for " . __PACKAGE__ . " authentication"
Branch: 1 branch
BranchTrueFalseTotal
unless defined $auth 0 0 0
9 unless defined($auth);
10 }
11  
12 sub _auth_Header {
13 0 ▶ my ( $self, $auth, $req ) = @_;
Subroutine _auth_Header: not called CC=1 SCAR=6.9
14 0 $req->header( Authorization => $auth );
15 }
16  
17 8 1;
« blib/lib/WWW/JSON/Role/Authentication/Basic.pm ↑ Summary blib/lib/WWW/JSON/Role/Authentication/OAuth2.pm »