-$Id: Changes,v 1.20 2006-03-09 11:36:49 mike Exp $
+$Id: Changes,v 1.21 2006-03-09 12:57:19 mike Exp $
Revision history for Perl extension Net::Z3950::ZOOM.
+1.03 Thu Mar 9 12:55:23 GMT 2006
+ - Allow additional key => value pairs as arguments to the
+ ZOOM::Connectoion constructor; these are added as Connection
+ options before the protocol connection is forged.
+
1.02 Thu Mar 9 11:36:55 GMT 2006
- Add interface to yaz_version().
- Emit big warning at startup time if YAZ version is less than
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Net-Z3950-ZOOM
-version: 0.01
+version: 1.02
version_from: lib/Net/Z3950/ZOOM.pm
installdirs: site
requires:
+ MARC::Record: 1.38
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17
-# $Id: ZOOM.pm,v 1.10 2006-01-31 16:13:05 mike Exp $
+# $Id: ZOOM.pm,v 1.11 2006-03-09 12:57:19 mike Exp $
package Net::Z3950::ZOOM;
use strict;
use warnings;
-our $VERSION = '1.02';
+our $VERSION = '1.03';
require XSLoader;
XSLoader::load('Net::Z3950::ZOOM', $VERSION);
-# $Id: ZOOM.pm,v 1.26 2006-02-10 16:24:34 mike Exp $
+# $Id: ZOOM.pm,v 1.27 2006-03-09 12:57:19 mike Exp $
use strict;
use warnings;
package ZOOM;
-
# Member naming convention: hash-element names which begin with an
# underscore represent underlying ZOOM-C object descriptors; those
# which lack them represent Perl's ZOOM objects. (The same convention
sub new {
my $class = shift();
- my($host, $port) = @_;
+ my($host, $port, @options) = @_;
my $_conn = Net::Z3950::ZOOM::connection_new($host, $port || 0);
my $conn = bless {
port => $port,
_conn => $_conn,
};
+
+ while (@options >= 2) {
+ my $key = shift(@options);
+ my $val = shift(@options);
+ $conn->option($key, $val);
+ }
+
+ die "Odd number of options specified"
+ if @options;
+
$conn->_check();
return $conn;
}
-# $Id: ZOOM.pod,v 1.29 2006-02-20 11:30:58 mike Exp $
+# $Id: ZOOM.pod,v 1.30 2006-03-09 12:57:19 mike Exp $
use strict;
use warnings;
use ZOOM;
eval {
- $conn = new ZOOM::Connection($host, $port)
+ $conn = new ZOOM::Connection($host, $port,
+ databaseName => "mydb");
$conn->option(preferredRecordSyntax => "usmarc");
$rs = $conn->search_pqf('@attr 1=4 dinosaur');
$n = $rs->size();
$conn = new ZOOM::Connection("indexdata.dk:210/gils");
$conn = new ZOOM::Connection("tcp:indexdata.dk:210/gils");
$conn = new ZOOM::Connection("http:indexdata.dk:210/gils");
+ $conn = new ZOOM::Connection("indexdata.dk", 210,
+ databaseName => "mydb",
+ preferredRecordSyntax => "marc");
Creates a new Connection object, and immediately connects it to the
specified server. If you want to make a new Connection object but
number of the Z39.50 server to connect to; in the latter case, the
single argument is a YAZ service-specifier string of the form
+When the two-option form is used (which may be done using a vacuous
+second argument of zero), any number of additional argument pairs may
+be provided, which are interpreted as key-value pairs to be set as
+options after the Connection object is created but before it is
+connected to the server. This is a convenient way to set options,
+including those that must be set before connecting such as
+authentication tokens.
+
=over 4
=item