line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::orcid_profile; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
85265
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
155474
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
292
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
774
|
use WWW::ORCID; |
|
1
|
|
|
|
|
3452
|
|
|
1
|
|
|
|
|
28
|
|
8
|
1
|
|
|
1
|
|
366
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
779
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
with 'Catmandu::Fix::SimpleGetValue'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub emit_value { |
15
|
0
|
|
|
0
|
0
|
|
my ($self, $var) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
"${var} = WWW::ORCID::API::Pub->new->get_profile(${var}) if is_string(${var}) && length(${var});"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Catmandu::Fix::orcid_profile - find an ORCID profile for an identifier |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Find an ORCID profile for an identifier |
27
|
|
|
|
|
|
|
# orcid: '0000-0001-8390-6171' |
28
|
|
|
|
|
|
|
orcid_profile(orcid) |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SEE ALSO |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L<Catmandu::Fix>, |
33
|
|
|
|
|
|
|
L<WWW::ORCID> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |