line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::ORCID::Transport; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
74822
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
100
|
|
4
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
121
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.02_01; |
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
268
|
use Moo::Role; |
|
3
|
|
|
|
|
13718
|
|
|
3
|
|
|
|
|
26
|
|
9
|
3
|
|
|
3
|
|
1684
|
use namespace::clean; |
|
3
|
|
|
|
|
8019
|
|
|
3
|
|
|
|
|
21
|
|
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; |