line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::ORCID; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
72465
|
use strict; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.0402; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
477
|
use Class::Load qw(try_load_class); |
|
1
|
|
|
|
|
20511
|
|
|
1
|
|
|
|
|
63
|
|
9
|
1
|
|
|
1
|
|
9
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
10
|
1
|
|
|
1
|
|
462
|
use namespace::clean; |
|
1
|
|
|
|
|
7497
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $DEFAULT_VERSION = '2.0'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub new { |
15
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
16
|
0
|
0
|
|
|
|
|
my $opts = ref $_[0] ? {%{$_[0]}} : {@_}; |
|
0
|
|
|
|
|
|
|
17
|
0
|
|
0
|
|
|
|
my $version = $opts->{version} ||= $DEFAULT_VERSION; |
18
|
0
|
|
|
|
|
|
$version =~ s/\./_/g; |
19
|
0
|
0
|
|
|
|
|
$version .= '_public' if $opts->{public}; |
20
|
0
|
|
|
|
|
|
my $class = "WWW::ORCID::API::v${version}"; |
21
|
0
|
0
|
|
|
|
|
try_load_class($class) or croak("Could not load $class: $!"); |
22
|
0
|
|
|
|
|
|
$class->new($opts); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |