[librecat-dev] From Catmandu::Importer::SRU to MARC::Record
Nicolas Franck
Nicolas.Franck at UGent.be
Wed Oct 26 11:34:34 CEST 2016
@Johan: add_many expects either an array or a Catmandu::Iterable, so that's ok
________________________________________
From: librecat-dev-bounces at lists.uni-bielefeld.de <librecat-dev-bounces at lists.uni-bielefeld.de> on behalf of Johann Rolschewski <rolschewski at gmail.com>
Sent: Wednesday, October 26, 2016 11:29 AM
To: Magnus Enger; librecat-dev at lists.uni-bielefeld.de
Subject: Re: [librecat-dev] From Catmandu::Importer::SRU to MARC::Record
Hi Magnus,
> my $record;
> my $exporter = Catmandu->exporter('MARC', file => \$record, type => "XML" );
> $exporter->add_many($importer);
add_many() expects an array, so you should the to_array() method of the
importer object:
$exporter->add_many($importer->to_array);
Best regards,
Johann
_______________________________________________
librecat-dev mailing list
- send list mails to librecat-dev at lists.uni-bielefeld.de
- to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
- project website: http://librecat.org/
More information about the librecat-dev
mailing list