line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::ORCID::Transport; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
87163
|
use strict; |
|
3
|
|
|
|
|
16
|
|
|
3
|
|
|
|
|
92
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
130
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.0402; |
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
472
|
use Moo::Role; |
|
3
|
|
|
|
|
16659
|
|
|
3
|
|
|
|
|
17
|
|
9
|
3
|
|
|
3
|
|
1754
|
use namespace::clean; |
|
3
|
|
|
|
|
11013
|
|
|
3
|
|
|
|
|
18
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'WWW::ORCID::Base'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
for my $method (qw(get post_form post put delete)) { |
14
|
|
|
|
|
|
|
requires $method; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
around $method => sub { |
17
|
|
|
|
|
|
|
my $orig = shift; |
18
|
|
|
|
|
|
|
my $self = shift; |
19
|
|
|
|
|
|
|
if ($self->log->is_debug) { |
20
|
|
|
|
|
|
|
$self->log->debugf("$method request: %s", \@_); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
my $res = $orig->($self, @_); |
23
|
|
|
|
|
|
|
if ($self->log->is_debug) { |
24
|
|
|
|
|
|
|
$self->log->debugf("$method response: %s", $res); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
$res; |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |