| 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
Condition50%1/2
$self->{'attempts'} || 0
MC/DC0%0/1
$self->{'attempts'} || 0
$self->{'attempts'}
Truth table50%1/2
A
A= $self->{'attempts'}
| |||||||||||||||||||||
| 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; | |||||||||||||||||||