line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::orcid_bio; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.13'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
87525
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
162502
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
284
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
711
|
use WWW::ORCID; |
|
1
|
|
|
|
|
3252
|
|
|
1
|
|
|
|
|
24
|
|
8
|
1
|
|
|
1
|
|
334
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
774
|
|
|
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_bio(${var}) if is_string(${var}) && length(${var});"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Catmandu::Fix::orcid_bio - find an ORCID bio for an identifier |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Find an ORCID bio for an identifier |
27
|
|
|
|
|
|
|
# orid: '0000-0001-8390-6171' |
28
|
|
|
|
|
|
|
orcid_bio(orcid) |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SEE ALSO |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L<Catmandu::Fix>, |
33
|
|
|
|
|
|
|
L<WWW::ORCID> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |