Release 1.03 (connection constructor allows additional option arguments)
[ZOOM-Perl-moved-to-github.git] / lib / ZOOM.pod
index 04c4881..e2aafec 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ZOOM.pod,v 1.28 2006-01-04 17:27:10 mike Exp $
+# $Id: ZOOM.pod,v 1.30 2006-03-09 12:57:19 mike Exp $
 
 use strict;
 use warnings;
@@ -11,7 +11,8 @@ ZOOM - Perl extension implementing the ZOOM API for Information Retrieval
 
  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();
@@ -159,6 +160,9 @@ http://zoom.z3950.org/api/zoom-current.html#3.2
  $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
@@ -170,6 +174,14 @@ argument.  In the former case, the arguments are the name and port
 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
@@ -866,7 +878,7 @@ http://indexdata.com/yaz/doc/zoom.ext.tkl
 
 =head4 send()
 
- $p->send("createdb");
+ $p->send("create");
 
 Sends a package to the server associated with the Connection that
 created it.  Problems are reported by throwing an exception.  The