ARK/Writer.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 3 SCAR 19.5
CC
3
Cov
0%
write
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 7.0
1 package Koha::Contrib::ARK::Writer;
2 # ABSTRACT: Write biblio records into Koha Catalog
3 $Koha::Contrib::ARK::Writer::VERSION = '1.1.2';
4 use Moose;
5 use Modern::Perl;
6 use C4::Biblio qw/ ModBiblio /;
7  
8 with 'MooseX::RW::Writer';
9  
10  
11 has ark => ( is => 'rw', isa => 'Koha::Contrib::ARK' );
12  
13  
14 sub write {
15 my $self = shift;
16  
17 my $ark = $self->ark;
18 return unless $ark->doit;
19  
20 my $current = $ark->current;
21 my $biblio = $current->{biblio};
22 my $record = $biblio->{record};
23  
24 return unless $record;
25  
26 ModBiblio(
27 $record->as('Legacy'),
28 $biblio->biblionumber,
29 $biblio->frameworkcode
30 );
31 }
32  
33  
34 1;
35  
36 __END__