line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::ORCID; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
60798
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
32
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.02_01; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
231
|
use Class::Load qw(try_load_class); |
|
1
|
|
|
|
|
13756
|
|
|
1
|
|
|
|
|
44
|
|
9
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
10
|
1
|
|
|
1
|
|
240
|
use namespace::clean; |
|
1
|
|
|
|
|
5280
|
|
|
1
|
|
|
|
|
5
|
|
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__ |