SRU::Server(3pm)

SRU::Server3pm

Respond to sru requests via cgi::application

Usage

    package MySRU;
    use base qw( SRU::Server );
    sub explain {
        my $self = shift;
        # $self->request isa SRU::Request::Explain
        # $self->response isa SRU::Response::Explain
    }
    sub scan {
        my $self = shift;
        # $self->request isa SRU::Request::Scan
        # $self->response isa SRU::Response::Scan
        # $self->cql is the root node of a CQL::Parser-parsed query
    }
    sub searchRetrieve {
        my $self = shift;
        # $self->request isa SRU::Request::SearchRetrieve
        # $self->response isa SRU::Response::SearchRetrieve
        # $self->cql is the root node of a CQL::Parser-parsed query
    }
    package main;
    MySRU->new->run;

Overview

This module brings together all of the SRU verbs (explain, scan and searchRetrieve) under a sub-classable object based on CGI::Application.

Methods

explain

This method is used to return an explain response. It is the default method.

scan

This method returns a scan response.

searchRetrieve

This method returns a searchRetrieve response.

Cgi::application methods

setup

Sets the "run_modes", "mode_param" and the default runmode (explain).

cgiapp_prerun

Parses the incoming SRU request and if needed, checks the CQL query.

cgiapp_postrun

Sets the content type (text/xml) and serializes the response.

error_mode

Stub error runmode.

Releases

7 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7
  2. 8
  3. 9–10
  4. 11
  5. 12–13