NAME

Handel::ConfigReader - Read in Handel configuration settings

SYNOPSIS

use Handel::ConfigReader;

my $cfg = Handel::ConfigReader-new();
my $setting = $cfg->get('HandelMaxQuantity');

VERSION

$Id: ConfigReader.pm 273 2005-03-02 02:20:35Z claco $

DESCRIPTION

Handel::ConfigReader is a generic wrapper to get various configuration values. As some point this will probably get worked into XS/custom httpd.conf directives.

Starting in version 0.11, each instance is also a tied hash. The two usages are the same:

my $cfg = Handel::ConfigReader->new();

my $setting = $cfg->get('Setting');
my $setting = $cfg->{'Setting'};

Thie latter is the preferred usage in anticipation of als integrating Apache::ModuleConfig and custom directives which use the same hash syntax.

CONSTRUCTOR

Returns a new Handel::ConfigReader object.

my $cfg = Handel::ConfigReader->new();

METHODS

get($key [, $default])

Returns the configured value for the key specified. You can use this as an instance method or as a simpleton:

my $setting = Handel::ConfigReader->get('HandelMaxQuantity');

my $cfg = Handel::ConfigReader->new();
my $setting = $cfg->get('HandelMaxQuantity');

You can also pass a default value as the second parameter. If no value is loaded for the key specified, the default value will be returned instead.

AUTHOR

Christopher H. Laco
CPAN ID: CLACO
cpan@chrislaco.com
http://today.icantfocus.com/blog/