Frequently Asked Questions

7th October 2002

1. Preamble
2. Questions and Answers
        2.1. Net::Z3950 under mod_perl
        2.2. Running Net::Z3950 on Windows
        2.3. Using Net::Z3950 for asynchronous broadcast searches

1. Preamble

This is an embryonic list of Frequently Asked Questions for the Net::Z3950 module. The phrase ``frequently'' is used here to mean ``has been asked at least once'', but I'm Using My Skill And Judgement in restricting this list to questions which seem likely to crop up again.

I'm not going to try to predict what questions people might want to ask in advance; neither am I going to pad this FAQ out with introductory questions like ``What is the Net::Z3950 module?'' If you want to know that, you need to go back to the home page. This FAQ is aimed at people who are actually trying to do real development with Net::Z3950

2. Questions and Answers

2.1. Net::Z3950 under mod_perl

Michael <lion@apocalypse.org> asked

I'm having a problem using the Net::Z3950 package and mod_perl. The running the application under perl and everything is - its able to connect to any arbitrary Z3950 server, search and pull results.

When the same application is switched under mod_perl, the Connect method always returns a 'Connection Refused' result in $!.

Both netstat and tcpdump reveal a connected socket, but nothing else going on.

Answer: We don't really know what caused this, but it has become apparent that the solution is to upgrade mod_perl. The problem which occurred running under 1.24 went away when Michael upgraded to 1.26.

Nice to know it wasn't my fault :-)

However, in the discussion that ensued, Anders Sønderberg Mortensen <sondberg@indexdata.dk> pointed out that as of the current version (0.27), there are other, broader, problems in running in persistent environments like mod_perl: specifically, there's still no method for closing a connection once it's been opened, nor for deleting a result set once it's been created. So you'll want to be aware of resource-use issues in your mod_perl programs.

UPDATE, 7th October 2002

This is much less true than it used to be. As of release 0.30, it's been possible to close connections.

2.2. Running Net::Z3950 on Windows

This one comes up a lot. As of this writing (7th October 2002), problems with the prerequisite Event module prevent Net::Z3950 from being used under Windows. However, there are alternatives.

2.3. Using Net::Z3950 for asynchronous broadcast searches

You're supposed to be able to use the Net::Z3950 module to broadcast searches to multiple servers asynchronously; however, I have not yet got aroung to writing the documentation of the asynchronous interface - see the samefully sparse Asynchronous Synopsis section of the main manual page and the atrocious Asynchronous Mode section of the Tutorial.

Not only that, but the multiplex.pl included in the distribution's samples directory hasn't been touched for eighteen months and isn't a good demo for various reasons. And the Net::Z3950::Multiplex library that I started work on back on 23rd February 2001 has laid dormant for 816 days and counting ...

But wait! All is not lost. Myron Turner <mturner@Ms.UManitoba.CA> has got bored waiting; he's written and distributed his own Net::Z3950::AsyncZ module, built on top of Net::Z3950, which achieves a synchronous operation by fork()ing. (That's certainly not how I intended doing it, but hey, I've had years to promote my favourite model, so whatever works is fine by me!)

Myron's module can be found at search.cpan.org/author/TURNERMM/Net-Z3950-AsyncZ-0.04 which includes browsable documentation and downloadable tarballs.

I've not used this myself to I make no guarantees, warranties, etc., but I've got no reason to think it's anything other than a good piece of work. Enjoy.

Feedback to <mike@indexdata.com> is welcome!