Importer/SRU/Parser/picaxml.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 86.9% 20 / 23 CC 2 SCAR 4.1
CC
2
Cov
94%
parse
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Fix/pica_append.pm ↑ Summary Importer/SRU/Parser/ppxml.pm »
1 package Catmandu::Importer::SRU::Parser::picaxml;
2  
3 1 our $VERSION = '1.18';
4  
5 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use PICA::Parser::XML;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶sub parse {
Subroutine parse: called CC=2 SCAR=7.0
Pod undocumented
9 4 my ( $self, $record ) = @_;
10  
11 4 my $xml = $record->{recordData}->toString();
12 4 my $parser = PICA::Parser::XML->new($xml);
13  
14 4 ▶ my $next = $parser->next || return;
Condition50%1/2
$parser->next || (return)
l!l
40
MC/DC0%0/1
$parser->next || (return)
$parser->next
Truth table50%1/2
A
A= $parser->next
Aresult
11
00
15 4 $next->{record} = [ map { [@$_] } @{ $next->{record} } ];
16 4 return {%$next};
17 }
18  
19 1 1;
20 __END__
« Fix/pica_append.pm ↑ Summary Importer/SRU/Parser/ppxml.pm »