Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Net::Z3950::ScanSet
set of terms received in response to a Z39.50 scan

Net::Z3950::ScanSet - set of terms received in response to a Z39.50 scan


NAME

Net::Z3950::ScanSet - set of terms received in response to a Z39.50 scan


SYNOPSIS


        $ss = $conn->scan('@attr 1=4 fish');

        die $conn->errmsg() if !defined $ss;

        $size = $ss->size();

        for ($i = 0; $i < $size; $i++) {

                $term = $ss->term($i);

                $count = $ss->field($i, "freq");

                $displayTerm = $ss->field($i, "display");

                print "$displayTerm ($count)  [$term]\n";

        }


DESCRIPTION

A ScanSet object represents the set of terms found by a Z39.50 scan.

There is no public constructor for this class. ScanSet objects are always created by the Net::Z3950 module itself, and are returned to the caller via the Net::Z3950::Connection class's scan() or scanResult() method.


METHODS

errcode(), addinfo(), errmsg()


        if (!defined $ss->term($i)) {

                print "error ", $ss->errcode(), " (", $ss->errmsg(), ")\n";

                print "additional info: ", $ss->addinfo(), "\n";

        }

When the term() or <field()> method returns an undefined value, indicating an error, it also sets into the scan-set the BIB-1 error code and additional information returned by the server. They can be retrieved via the errcode() and addinfo() methods.

As a convenience, $ss-errmsg()> is equivalent to Net::Z3950::errstr($ss-errcode())>.


AUTHOR

Mike Taylor <mike@indexdata.com>

First version Friday 7th May 2004.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy