blib/lib/WWW/ORCID/Transport.pm

filter: Statementstmt 69.2% 18 / 26 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 62.8% 22 / 35 SCAR 12.7
CC
3
Cov
60%
__ANON__
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.6
« Build ↑ Summary blib/lib/WWW/ORCID/Transport/LWP.pm »
1 package WWW::ORCID::Transport;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = 0.02_01;
7  
8 3 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 with 'WWW::ORCID::Base';
12  
13 3 for my $method (qw(get post_form post put delete)) {
14 15 requires $method;
15  
16 around $method => sub {
17 0 ▶ my $orig = shift;
Subroutine __ANON__: not called CC=3 SCAR=24.8
18 0 my $self = shift;
19 0 ▶ if ($self->log->is_debug) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->log->is_debug) 0 0 0
20 0 $self->log->debugf("$method request: %s", \@_);
21 }
22 0 my $res = $orig->($self, @_);
23 0 ▶ if ($self->log->is_debug) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->log->is_debug) 0 0 0
24 0 $self->log->debugf("$method response: %s", $res);
25 }
26 0 $res;
27 15 };
28 }
29  
30 3 1;
« Build ↑ Summary blib/lib/WWW/ORCID/Transport/LWP.pm »