| 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
| |||||||||||
| 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
| |||||||||||
| 24 | 0 | $self->log->debugf("$method response: %s", $res); | |||||||||
| 25 | } | ||||||||||
| 26 | 0 | $res; | |||||||||
| 27 | 15 | }; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 3 | 1; | |||||||||