---
name: "RefDB::SRU"
section: "3pm"
platform: "linux"
package: "librefdb-sru-perl"
version: "0.7-2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/RefDB::SRU"
---

# RefDB::SRU(3pm)

Module for a SRU service for RefDB

## NAME

RefDB::SRU - Module for a SRU service for RefDB

## SYNOPSIS

```
  use RefDB::SRU;
  my $sru_query = new RefDB::SRU(\%params);
  print $sru_query->result();
```

## DESCRIPTION

Implements the backend code of a SRU service to query RefDB databases. Your own code must provide the networking interface which invokes the code in this module

## FEEDBACK

Send bug reports, questions, and comments to the refdb-users mailing list at:

refdb-users@lists.sourceforge.net

For list information and archives, please visit:

http://lists.sourceforge.net/lists/listinfo/refdb-users

## AUTHOR

Markus Hoenicka, markus@mhoenicka.de

## SEE ALSO

This module is part of the RefDB package, a reference manager and bibliography tool for markup languages. Please visit http://refdb.sourceforge.net for further information.

### new

Title   : new

Usage   : `$diag` = Diagnostics::new($number, `$detail`)

Function: creates a new Diagnostics object

Parameter: `$number:` the SRU diagnostic number

Parameter: `$detail:` the SRU diagnostic detail

### diag\_uri

Title   : diag\_uri

Usage   : `$uri` = `$diag`-\>*diag\_uri()*

Function: returns the URI associated with the diagnostic

### diag\_detail

Title   : diag\_detail

Usage   : `$detail` = `$diag`-\>*diag\_detail()*

Function: returns the detail associated with the diagnostic

### diag\_message

Title   : diag\_message

Usage   : `$message` = `$diag`-\>*diag\_message()*

Function: returns the message associated with the diagnostic

### visit

Title   : visit

Usage   : called by CQL parser at each node

Function: processes each node

### boolean

Title   : boolean

Usage   : called by visit

Function: translates boolean notes into the RefDB syntax

### term

Title   : term

Usage   : called by *visit()*

Function: translates qualifier and terms into RefDB syntax

### \_translate\_regex

Title   : \_translage\_regex

Usage   : \_translate\_regex($string)

Function: translates regular expressions from the CQL syntax to the database engine syntax

### \_maybeQuote

Title   : \_maybeQuote

Usage   : \_maybeQuote($string)

Function: quotes particular characters

## package functions

### new

Title   : new

Usage   : `$my_query`-\>new(\\%params);

Function: creates and initializes a new query object

Arguments: reference to a hash containing the query parameter-value pairs

Returns : new object

### print\_vars

Title   : print\_vars

Usage   : `$my_query`-\>print\_vars;

Function: displays the parameter/value pairs for debugging purposes

### run

Title   : run

Usage   : `$my_query`-\>run;

Function: analyzes the parameter values and runs an appropriate operation

### response

Title   : response

Usage   : `$query`-\>*response()*

Function: accessor for the query response string
