|
NAMESRU::Server - Respond to SRU requests via CGI::Application SYNOPSIS 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;
DESCRIPTIONThis module brings together all of the SRU verbs (explain, scan and searchRetrieve) under a sub-classable object based on CGI::Application. METHODSexplainThis method is used to return an explain response. It is the default method. scanThis method returns a scan response. searchRetrieveThis method returns a searchRetrieve response. CGI::APPLICATION METHODSsetupSets the "run_modes", "mode_param" and the default runmode (explain). cgiapp_prerunParses the incoming SRU request and if needed, checks the CQL query. cgiapp_postrunSets the content type (text/xml) and serializes the response. error_modeStub error runmode. AUTHORS
COPYRIGHT AND LICENSEThis software is copyright (c) 2013 by Ed Summers. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|