Catmandu/Fix/Condition/is_live_orcid.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 83.3% 20 / 24 CC 1 SCAR 1.8
CC
1
Cov
89%
emit_test
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Catmandu/Fix/Condition/is_archived_web_uri.pm ↑ Summary Catmandu/Fix/orcid_bio.pm »
1 package Catmandu::Fix::Condition::is_live_orcid;
2  
3 1 our $VERSION = '0.15';
4  
5 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use WWW::ORCID;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Catmandu::Fix::Has;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 has path => (fix_arg => 1);
11  
12 1 with 'Catmandu::Fix::Condition::SimpleAllTest';
13  
14 0 ▶sub emit_test {
Subroutine emit_test: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my ($self, $var) = @_;
16 0 "(is_value(${var}) && WWW::ORCID::API::Pub->new->get_bio(${var})->{'orcid-profile'})";
17 }
18  
19 =head1 NAME
20  
21 Catmandu::Fix::Condition::is_live_orcid - test if the ORCID can be resolved
22  
23 =head1 SYNOPSIS
24  
25 if is_live_orcid(orcid)
26 ...
27 else
28 ...
29 end
30  
31 =head1 SEE ALSO
32  
33 L<Catmandu::Fix>
34  
35 =cut
36  
37 1 1;
« Catmandu/Fix/Condition/is_archived_web_uri.pm ↑ Summary Catmandu/Fix/orcid_bio.pm »