Barbie > Labyrinth > Labyrinth::Request

Download:
Labyrinth-5.23.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 5.23   Source  

NAME ^

Labyrinth::Request - Request Manager for Labyrinth

SYNOPSIS ^

  use Labyrinth::Request;

  # database object creation
  my ($content,@actions) = Request($realm);

DESCRIPTION ^

The Request package, given a request string (or defaults), will retrieve the appropriate actions, template file and continuations for that request.

The configuration of request settings can either be held within INI files within a designated path or in request table within a database.

If using INI files, each file represents a collection of commands within a single section. There is one special section, 'realm', which describes the overall layout files, actions and continuations for the type of account. Typically there are at least two realms, 'public' and 'admin'. To describe the path to these request files, the following should exist within your global settings file:

  requests=/path/to/request/files

Alternative if you wish to use the request settings from a database table, in your globale settings file, you will need the following setting:

  requests=dbi

For more information for the database method, please see the Labyrinth::Request distribution.

FUNCTIONS ^

Constructor

new()

Create a new request object.

Methods

Handling Actions

next_action()

For the current command request, return the next action within its action list.

add_actions(@actions)

Add actions to the action list for the current command request.

Handling Command Resets

reset_realm($realm)

Reloads settings for a new realm setting.

reset_request($request)

Reloads settings for a new command request.

redirect

Instead of a local template file or a continuation, a redirect may be used. This method reformats the URL within a redirect request.

Accessor Methods

layout

Layout template to be used

content

Content template to be used

onsuccess

Command to execute if this command succeeds.

onerror

Command to execute if this command fails.

onfailure

Command to execute if this command fails with an unrecoverable error.

SEE ALSO ^

  Config::IniFiles
  Labyrinth

AUTHOR ^

Barbie, <barbie@missbarbell.co.uk> for Miss Barbell Productions, http://www.missbarbell.co.uk/

COPYRIGHT & LICENSE ^

  Copyright (C) 2002-2014 Barbie for Miss Barbell Productions
  All Rights Reserved.

  This module is free software; you can redistribute it and/or
  modify it under the Artistic License 2.0.
syntax highlighting: