The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

  Catmandu::Importer::Z3950 - Package that imports Z3950 data

  Returns the raw response. So the output depends on the preferredRecordSyntax.
  You could use the MARC::Record package to parse the MARC output blob.

SYNOPSIS

  use Catmandu::Importer::Z3950;

  my %attrs = (
    host => 'z3950.loc.gov',
    port => 7090,
    databaseName => "Voyager",
    preferredRecordSyntax => "USMARC",
    queryType => 'PQF', # CQL or PQF
    query => '@attr 1=4 dinosaur'
  );

  my $importer = Catmandu::Importer::Z3950->new(%attrs);

  my $n = $importer->each(sub {
    my $hashref = $_[0];
    ...
  });

  print "DONE. ($n). \n";

  `host`, `database` and `query` are required, `user` and `user` are optional.
  `port`, `preferredRecordSyntax` and `queryType` will default to 210 'USMARC' and 'CQL' respectively.

REMARK

This package uses the ZOOM package internally. For more info visit: http://search.cpan.org/~mirk/Net-Z3950-ZOOM-1.28/lib/ZOOM.pod

The ZOOM package has a hard dependency on YAZ toolkit. For more info about YAZ, visit: https://www.indexdata.com/yaz

Installing YAZ: - (osx, using homebrew): brew install yaz - (linux, using yum): yum install yaz libyaz

SEE ALSO

Catmandu::Iterable