The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Labyrinth::Variables - General Variables used throughout the system.

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 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

Process Flow Handling

SetCommand
SetError

SEE ALSO

  Labyrinth

AUTHOR

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

COPYRIGHT & LICENSE

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

  This module is free software; you can redistribute it and/or
  modify it under the same terms as Perl itself.