Consumer/UserAgent/Curl.pm

filter: Statementstmt 63.1% 12 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod n/a totaltotal 55.1% 16 / 29 CC 2 SCAR 8.5
CC
2
Cov
57%
timeout
6.0
agent
2.0
default_headers
2.0
CRAP 2.3
« Consumer/Response.pm ↑ Summary
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package MooseX::Role::REST::Consumer::UserAgent::Curl;
5  
6 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use HTTP::Headers;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 extends 'WWW::Curl::UserAgent';
9  
10 0 ▶sub agent {
Subroutine agent: not called CC=1 SCAR=6.9
11 0 shift->user_agent_string(@_);
12 }
13  
14 #FIXME: version of libcurl that we have has a bug in subsecond timeouts
15 has '+connect_timeout' => ( default => sub { 1000 } );
16  
17 0 ▶sub default_headers { HTTP::Headers->new };
Subroutine default_headers: not called CC=1 SCAR=6.9
18 0 ▶sub use_eval {};
Subroutine use_eval: not called CC=1 SCAR=0.0
19  
20 0 ▶sub timeout {
Subroutine timeout: not called CC=2 SCAR=17.9
21 0 my ($self) = shift;
22 0 ▶ if(@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
23 0 my $timeout = $_[0] * 1000;
24 0 $self->SUPER::timeout($timeout);
25 } else {
26 0 return $self->SUPER::timeout;
27 }
28 };
29  
30 __PACKAGE__->meta->make_immutable;
31 1;
« Consumer/Response.pm ↑ Summary