Net::Z3950 0.51 review
DownloadNet::Z3950 is a Perl extension for talking to Z39.50 servers. WARNING You should not be using this module unless you need this
|
|
Net::Z3950 is a Perl extension for talking to Z39.50 servers.
WARNING
You should not be using this module unless you need this precise API for compatibility reasons. New applications should use the ZOOM-Perl module (Net::Z3950::ZOOM) instead.
SYNOPSIS
(This code blocks in reads: see below for sample non-blocking code which allows multiple servers to be searched in parallel.)
use Net::Z3950;
$conn = new Net::Z3950::Connection('server.host.name', 210)
or die $!;
$rs = $conn->search('au=kernighan or su=unix')
or die $conn->errmsg();
my $n = $rs->size();
print "found $n records:n";
foreach $i (1..$n) {
$rec = $rs->record($i) or die $rs->errmsg();
print $rec->render();
}
$conn->close();
This module provides a Perl interface to the Z39.50 information retrieval protocol (aka. ISO 23950), a mature and powerful protocol used in application domains as diverse as bibliographic information, geo-spatial mapping, museums and other cultural heritage information, and structured vocabulary navigation.
Net::Z3950.pm is an implementation of the Perl binding for ZOOM, the Z39.50 Objct Orientation Model. Bindings for the same abstract API are, or will be, available in other languages including C, C++, Java and Tcl.
Two basic approaches are possible to building clients with this module:
The simple synchronous approach considers blocking reads acceptable, and therefore allows a straightforward style of imperative programming. This approach is suitable for clients which only talk to one server at a time, and is exemplified by the code in the SYNOPSIS section above.
The more complex asynchronous approach, appropriate for clients which multiplex simultaneous connections, requires a slightly less familiar event-driven programming style, as exemplified in the ASYNCHRONOUS SYNOPSIS section below.
(The simpler synchronous interface functions are implemented as a thin layer on top of the asynchronous functions.)
Requirements:
Perl
Net::Z3950 0.51 keywords