CGI::Lazy::Config - CGI::Lazy::Config documentation


CGI-Lazy documentation  | view source Contained in the CGI-Lazy distribution.

Index


LEGAL

Top

NAME

Top

CGI::Lazy::Config

SYNOPSIS

Top

	use CGI::Lazy;

	my $q = CGI::Lazy->new('/path/to/config/file');

	my $c = $q->config;

	my $prop = $c->property1; #getter

	$c->property1('foo'); #setter

DESCRIPTION

Top

Internal module used for parsing config file and getting/ setting values from same.

Configuration values are accessed by calling the property name on the config object without arguments.

The same method doubles as a setter if called with arguments.

METHODS

Top

configfile ()

Returns the name of the config file the object is based on

get ( property )

Static accessor method. Use in places where autoloading isn't appropriate. e.g $q->widget->"somestring".$variable or some such nonsense.

property

name of the property to retrieve

new ( q vars )

Constructor. Creates and returns the config object.

q

CGI::Lazy object.

vars

Hashref containing initialization variables, or absolute path to config file.

CGI::Lazy::Config uses an autoloader to get and set its properties. You can access any property by calling $q->config->var where var is the name of the property.

set ( prop, value )

Static property setter. For use when autoloading isn't possible.

prop

Name of property

value

Value of property


CGI-Lazy documentation  | view source Contained in the CGI-Lazy distribution.