line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
our $VERSION = '0.15'; |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
use Catmandu::Sane; |
5
|
1
|
|
|
1
|
|
86192
|
use Moo; |
|
1
|
|
|
|
|
152745
|
|
|
1
|
|
|
|
|
5
|
|
6
|
1
|
|
|
1
|
|
228
|
use WWW::ORCID; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
622
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
3224
|
|
|
1
|
|
|
|
|
24
|
|
8
|
1
|
|
|
1
|
|
353
|
|
|
1
|
|
|
|
|
747
|
|
|
1
|
|
|
|
|
5
|
|
9
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Catmandu::Fix::SimpleGetValue'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my ($self, $var) = @_; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
0
|
0
|
|
"${var} = WWW::ORCID::API::Pub->new->search_bio(${var}) if is_hash_ref(${var});"; |
16
|
|
|
|
|
|
|
} |
17
|
0
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 NAME |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
Catmandu::Fix::orcid_find - find an ORCID id for a query |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Find ORCID bio for a query |
25
|
|
|
|
|
|
|
# query: |
26
|
|
|
|
|
|
|
# q: "Johson" |
27
|
|
|
|
|
|
|
orcid_find(query) |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
if exists(orcid.orcid-search-results.num-found) |
30
|
|
|
|
|
|
|
copy_field(orcid.orcid-search-results.orcid-search-result.0.orcid-profile.orcid-identifier.path,id) |
31
|
|
|
|
|
|
|
end |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SEE ALSO |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
L<Catmandu::Fix>, |
36
|
|
|
|
|
|
|
L<WWW::ORCID> |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |