NAME

Labyrinth::Variables - Generic Variables for Labyrinth

SYNOPSIS

use Labyrinth::Variables;

# output values
$tvars{title} = 'My Title';

DESCRIPTION

The Variables package contains a number of variables that are used across the system. The variables contain input and output values, and the functions are generic.

EXPORT

use Labyrinth::Variables;             # default (:all) = (:vars :subs)
use Labyrinth::Variables  qw(:vars);  # all variable containers
use Labyrinth::Variables  qw(:subs);  # all standard subroutines
use Labyrinth::Variables  qw(:xsub);  # all extended subroutines

Global Variables

%cgiparams

Holds all the scalar CGI parameter values. Access parameters as:

my $value = $cgiparams{$name};
%tvars

Holds all the template variable values, for use with the template parser. Access template variables as:

my $value = $tvars{$name};    # get the named variable
$tvars{$name} = $value;       # set scalar variable
$tvars{$hash} = \%hash;       # set hash variable
$tvars{$list} = \@list;       # set array variable
$dbi

Holds the reference to the DB access object. Created by the DBConnect() method, which must be called before any database activity commences.

Initialisation

init

Prepares the standard variable values, so that they are only called once on setup.

CGI Parameter Handling

CGIArray($name)

ParseParams only handles the scalar interface (CGI) parameters. In the event an array is required, CGIArray() is used to find and validate the parameter, before returning the list of values.

ParamsCheck

Given a list of fields, checks whether the interface (CGI) parameters have been set. Sets error conditions if any are missing.

Process Flow Handling

SetError

Sets the error condition as given.

SetCommand

Set the next commmand to be run.

Default Variable Loaders

LoadProfiles

Loads the permissions profiles, as stored in profiles config file.

LoadAccess

Loads the access permissions, as stored in the database.

SEE ALSO

Labyrinth

AUTHOR

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

COPYRIGHT & LICENSE

Copyright (C) 2002-2015 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.