Net::Z3950::SimpleServer is a Perl module which implements the server side of the Z39.50 (information retrieval) protocol. It hides the complexity of network exchanges, packet serialization, and session handling. You are required only to implement simple callbacks to support searching and record retrieval. It is the basis of the "Zoogle" project, which is a Z39.50 gateway to the Google web index.
OpenIsis provides a library and tools to access CDS/ISIS databases, which are mostly used for bibliographic data (ISO2709, Z39.50) but also well suited for other catalogues due to the very flexible indexing mechanism. Based on a C library, there are also bindings for Perl and Java (Tcl to come).