Catmandu::Importer::SRU(3pm) | User Contributed Perl Documentation | Catmandu::Importer::SRU(3pm) |
Catmandu::Importer::SRU - Package that imports SRU data
use Catmandu::Importer::SRU; my %attrs = ( base => 'http://www.unicat.be/sru', query => '(isbn=0855275103 or isbn=3110035170 or isbn=9010017362 or isbn=9014026188)', recordSchema => 'marcxml', parser => 'marcxml' ); my $importer = Catmandu::Importer::SRU->new(%attrs); my $count = $importer->each(sub { my $schema = $record->{recordSchema}; my $packing = $record->{recordPacking}; my $position = $record->{recordPosition}; my $data = $record->{recordData}; # ... }); # Using Catmandu::Importer::SRU::Package::marcxml, included in this release my $importer = Catmandu::Importer::SRU->new( base => 'http://www.unicat.be/sru', query => '(isbn=0855275103 or isbn=3110035170 or isbn=9010017362 or isbn=9014026188)', recordSchema => 'marcxml' , parser => 'marcxml' , ); # Using a homemade parser my $importer = Catmandu::Importer::SRU->new( base => 'http://www.unicat.be/sru', query => '(isbn=0855275103 or isbn=3110035170 or isbn=9010017362 or isbn=9014026188)', recordSchema => 'marcxml' , parser => MyParser->new , # or parser => '+MyParser' );
This Catmandu::Importer imports records via SRU.
SRU diagnostics are emitted as warnings except for parser set to "meta".
Records are fetched in multiple batches of this size or less.
Not set by default
All methods of Catmandu::Importer and by this Catmandu::Iterable are inherited. In addition the following methods are provided:
Return the current SRU request URL (useful for debugging).
Catmandu::Importer, Catmandu::Iterable, <http://www.loc.gov/standards/sru/>
2021-09-02 | perl v5.32.1 |