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