Consumer/RequestException.pm

filter: Statementstmt 100% 13 / 13 Branchbran 100% 2 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 86.9% 20 / 23 CC 3 SCAR 7.0
CC
3
Cov
94%
as_string
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Consumer/Dispatch.pm ↑ Summary Consumer/HandlerInvocation.pm »
1 package REST::Consumer::RequestException;
2  
3 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 9 ▶use base qw(REST::Consumer::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 13 ▶sub as_string {
Subroutine as_string: called CC=3 SCAR=11.1
Pod undocumented
8 13 my $self = shift;
9 13 ▶ my $attempts = (($self->{attempts} || 0) >= 2) ? " after $self->{attempts} attempts" : '';
Branch: 1 branch
BranchTrueFalseTotal
($self->{'attempts'} || 0) >= 2 ? : 6 7 13
Condition50%1/2
$self->{'attempts'} || 0
l!l
130
MC/DC0%0/1
$self->{'attempts'} || 0
$self->{'attempts'}
Truth table50%1/2
A
A= $self->{'attempts'}
Aresult
11
00
10 return sprintf("Request Failed$attempts: %s %s -- %s at %s\n",
11 $self->{request}->method,
12 $self->{request}->uri->as_string,
13 $self->{response}->status_line,
14 $self->{_immediate_caller},
15 13 );
16 }
17  
18 9 1;
« Consumer/Dispatch.pm ↑ Summary Consumer/HandlerInvocation.pm »