File Coverage

blib/lib/Catmandu/Fix/orcid_bio.pm
Criterion Covered Total %
statement 12 14 85.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 20 80.0


line stmt bran cond sub pod time code
1              
2             our $VERSION = '0.15';
3              
4             use Catmandu::Sane;
5 1     1   90967 use Moo;
  1         160951  
  1         6  
6 1     1   311 use WWW::ORCID;
  1         2  
  1         5  
7 1     1   672 use Catmandu::Fix::Has;
  1         3337  
  1         26  
8 1     1   359  
  1         742  
  1         6  
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->get_bio(${var}) if is_string(${var}) && length(${var});";
16             }
17 0            
18             =head1 NAME
19              
20             Catmandu::Fix::orcid_bio - find an ORCID bio for an identifier
21              
22             =head1 SYNOPSIS
23              
24             # Find an ORCID bio for an identifier
25             # orcid: '0000-0001-8390-6171'
26             orcid_bio(orcid)
27              
28             =head1 SEE ALSO
29              
30             L<Catmandu::Fix>,
31             L<WWW::ORCID>
32              
33             =cut
34              
35             1;