SRU::Request(3pm)

SRU::Request3pm

Factories for creating sru request objects.

Usage

    use SRU::Request;
    my $request = SRU::Request->newFromURI( $uri );

Overview

SRU::Request allows you to create the appropriate SRU request object from a URI object. This allows you to pass in a URI and get back one of SRU::Request::Explain, SRU::Request::Scan or SRU::Request::SearchRetrieve depending on the type of URI that is passed in. See the docs for those classes for more information about what they contain.

Methods

new( %query | $uri | $cgi | $env )

Create a new request object which is one of:

•

SRU::Request::Explain

•

SRU::Request::Scan

•

SRU::Request::SearchRetrieve

One can pass query parameters as hash, as URL, as URI, as CGI object or as PSGI request.

If the request is not formatted properly the call will return undef. The error encountered should be available in $SRU::Error.

newFromURI

newFromCGI

Deprecated aliases for "new".

asXML()

Used to generate <echoedExplainRequest>, <echoedSearchRetrieveRequest> and <echoedScanRequest> elements in the response.

asURI( [ $base ] )

Creates a URI of this request. The optional "base" URL, provided as string or as URI, is set to "http://localhost/" by default.

type()

Returns 'searchRetrieve', 'scan' or 'explain' depending on what type of object it is.

Releases

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

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

From libsru-perl 1.01-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.