Importer/WoSRetrieveById.pm

filter: Statementstmt 69.5% 16 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod n/a totaltotal 62.5% 20 / 32 CC 2 SCAR 9.2
CC
2
Cov
64%
__ANON__
6.0
_search_content
2.0
_search_response_type
2.0
CRAP 2.5
« Importer/WoSCitedReferences.pm ↑ Summary WoS.pm »
1 package Catmandu::Importer::WoSRetrieveById;
2  
3 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '0.0303';
6  
7 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Catmandu::Util qw(is_value xml_escape);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 with 'Catmandu::WoS::SearchRecords';
12  
13 has uid => (
14 is => 'ro',
15 required => 1,
16 0 ▶ coerce => sub {is_value($_[0]) ? [split ',', $_[0]] : $_[0]}
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
is_value($_[0]) ? : 0 0 0
17 1 );
18  
19 0 ▶sub _search_content {
Subroutine _search_content: not called CC=1 SCAR=6.9
20 0 my ($self, $start, $limit) = @_;
21  
22 my $uid = join '',
23 0 map {'<uid>' . xml_escape($_) . '</uid>'} @{$self->uid};
24  
25 0 <<EOF;
26 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
27 xmlns:woksearch="http://woksearch.v3.wokmws.thomsonreuters.com">
28 <soapenv:Header/>
29 <soapenv:Body>
30 <woksearch:retrieveById>
31 <databaseId>WOS</databaseId>
32 $uid
33 <queryLanguage>en</queryLanguage>
34 <retrieveParameters>
35 <firstRecord>$start</firstRecord>
36 <count>$limit</count>
37 <option>
38 <key>RecordIDs</key>
39 <value>On</value>
40 </option>
41 </retrieveParameters>
42 </woksearch:retrieveById>
43 </soapenv:Body>
44 </soapenv:Envelope>
45 EOF
46 }
47  
48 0 ▶sub _search_response_type {
Subroutine _search_response_type: not called CC=1 SCAR=6.9
49 0 'retrieveByIdResponse';
50 }
51  
52 1 1;
53  
54 __END__
« Importer/WoSCitedReferences.pm ↑ Summary WoS.pm »