line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::orcid_profile; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.13'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
91783
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
160477
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
269
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
706
|
use WWW::ORCID; |
|
1
|
|
|
|
|
3373
|
|
|
1
|
|
|
|
|
26
|
|
8
|
1
|
|
|
1
|
|
352
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
765
|
|
|
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
|
|
|
|
|
|
|
# orid: '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; |