| 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
| |||||||||||
| 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; | ||||||||||