exciting news from the net-z3950 list:

I am very pleased to announce the availability of ZOOM-Perl:
        http://search.cpan.org/~mirk/Net-Z3950-ZOOM/

This is an implementation of the ZOOM Abstract API for Perl, enabling
information retrieval using a de-facto standard API over any of the
Z39.50, SRU and SRW protocols.

In fact, it's very similar to Net::Z3950, in that both provide APIs
for building Z39.50 clients in Perl.  The differences are twofold:

1. ZOOM-Perl has a different front-end, since it conforms to the ZOOM
   Abstract API rather than living in its own little world as
   Net::Z3950 does.  (As a historical note, Net::Z3950 predates ZOOM,
   and was in effect the prototype for that effort.)

2. It also has a different back-end, being based on the ZOOM-C library
   that is part of the YAZ toolkit where Net::Z3950 was based on the
   low-level YAZ primitives.  (Again, this is a luxury that Net::Z3950
   didn't have because it predated ZOOM and prototyped the ZOOM
   interface that ZOOM-C implements.)

Since there is no middle, it's apparent that new front-end and
back-end mean that ZOOM-Perl is all new code, sharing no source with
Net::Z3950; but they are, spiritually speaking, close cousins, even if
they're not closely related by blood.

To give an idea of how the APIs differ, here is a super-simple program
in both dialects.  First, the old API that you are all familiar with:

        use Net::Z3950;
        $conn = new Net::Z3950::Connection('server.host.name', 210)
            or die $!;
        $rs = $conn->search('@attr 1=4 dinosaur')
            or die $conn->errmsg();
        my $n = $rs->size();
        print "found $n records\n";
        $rec = $rs->record(0)
            or die $rs->errmsg();
        print $rec->render();

And now, the new ZOOM API:

        use ZOOM;
        eval {
            $conn = new ZOOM::Connection($host, $port)
            $conn->option(preferredRecordSyntax => "usmarc");
            $rs = $conn->search_pqf('@attr 1=4 dinosaur');
            $n = $rs->size();
            print "found $n records\n";
            print $rs->record(0)->render();
        };
        if ($@) {
            print "Error ", [EMAIL PROTECTED]>code(), ": ", [EMAIL PROTECTED]>message(), 
"\n";
        }

The two most obvious changes are that the class-names are preceded by
ZOOM:: instead of Net::Z3950, and that errors are thrown as exceptions
rather than checked line-by-line.  Since neither of these is exactly
rocket science, it shouldn't be hard for Net::Z3950 adepts to move
across.

With that in mind, I strongly suggest that all new applications should
be built against the new ZOOM API instead of the old Net::Z3950 one.
We at Index Data will be supporting ZOOM-Perl for the foreseeable
future, but do not plan to make any further releases of Net::Z3950
(except possibly on last one that includes a big banner in the
documentation saying "USE ZOOM-PERL INSTEAD".  (Having said that, of
course, the old software will always be around, and since it's open
source, anyone else who'd like to adopt it and make new releases will
be quite at liberty to do so.)

We're pretty excited about ZOOM-Perl for several reasons, mostly
because it is based on ZOOM-C and therefore inherits the benefits of
several years' much more intensive development than has been spent on
Net::Z3950.  Among the facilities that ZOOM-Perl inherits are:
        - Sorting
        - Character-set handling
        - Translation between record syntaxes
        - Record update (for servers that support it)
        - Client-side CQL compilation.

I am pleased to say that, like Net::Z3950, the new ZOOM-Perl module is
and will remain free software, distributed under the same terms as
Perl itself.

Finally, I would like to thank LibLime, Meadville Public Library and
Nelsonville Public Library for their contribution to this software:
the libraries sponsored the development, and LibLime made it all
possible by bringing the sponsors and developers together.

Reply via email to