2009-10-10 16:07:21 +00:00
|
|
|
NAME
|
|
|
|
|
Config::General - Generic Config Module
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
|
use Config::General;
|
|
|
|
|
$conf = new Config::General("rcfile");
|
|
|
|
|
my %config = $conf->getall;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
This small module opens a config file and parses it's
|
|
|
|
|
contents for you. The new method requires one parameter
|
|
|
|
|
which needs to be a filename. The method getall returns a
|
|
|
|
|
hash which contains all options and it's associated values
|
|
|
|
|
of your config file.
|
|
|
|
|
|
|
|
|
|
The format of config files supported by Config::General is
|
|
|
|
|
inspired by the well known apache config format, in fact,
|
|
|
|
|
this module is 100% compatible to apache configs, but you
|
|
|
|
|
can also just use simple name/value pairs in your config
|
|
|
|
|
files.
|
|
|
|
|
|
|
|
|
|
In addition to the capabilities of an apache config file
|
|
|
|
|
it supports some enhancements such as here-documents, C-
|
|
|
|
|
style comments or multiline options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INSTALLATION
|
|
|
|
|
|
|
|
|
|
to install, type:
|
|
|
|
|
perl Makefile.PL
|
|
|
|
|
make
|
|
|
|
|
make test
|
|
|
|
|
make install
|
|
|
|
|
|
|
|
|
|
to read the complete documentation, type:
|
|
|
|
|
perldoc Config::General
|
2009-10-10 16:11:25 +00:00
|
|
|
perldoc Config::General::Extended
|
2009-10-10 16:18:02 +00:00
|
|
|
perldoc Config::General::Interpolated
|
2009-10-10 16:07:21 +00:00
|
|
|
|
|
|
|
|
see some example config files which can
|
|
|
|
|
be parsed with Config::Genreal in the subdirectory
|
|
|
|
|
t/cfg.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
COPYRIGHT
|
2009-10-10 16:18:02 +00:00
|
|
|
Config::General
|
|
|
|
|
Config::General::Extended
|
|
|
|
|
Copyright (c) 2000-2002 Thomas Linden <tom@daemon.de>
|
|
|
|
|
|
|
|
|
|
Config::General::Interpolated
|
|
|
|
|
Copyright (c) 2001 Wei-Hon Chen <plasmaball@pchome.com.tw>
|
2009-10-10 16:07:21 +00:00
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it
|
|
|
|
|
and/or modify it under the same terms as Perl itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BUGS
|
2009-10-10 16:18:02 +00:00
|
|
|
make test does currently not catch all possible scenarios.
|
2009-10-10 16:07:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
AUTHOR
|
2009-10-10 16:08:08 +00:00
|
|
|
Thomas Linden <tom@daemon.de>
|
2009-10-10 16:07:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
VERSION
|
1.36 - simplified new() parameter parsing, should be now a little
bit better to understand.
- added new parameter -DefaultConfig, which can hold a hashref
or a string, which will be used to pre-define values
of the resulting hash after parsing a config.
Thanks to Mark Hampton <mark.hampton@qualis.com> for the
suggestion.
- added new parameter -MergeDuplicateOptions, which allows
one to overwrite duplicate options, which is required,
if you turn on -DefaultConfig, because otherwise a
array would be created, which is probably not what you
wanted.
- added patch by Danial Pearce <danial@infoxchange.net.au>
to Config::General::Extended::keys(), which allows to
retrieve the keys of the object itself (which was not
directly possible before)
- added patch by Danial Pearce <danial@infoxchange.net.au>
to Config::General::Extended::value(), which allows to
set a value to a (perlish-) nontrue value. This was a
bug.
- added patch by Danial Pearce <danial@infoxchange.net.au>
to Config::General::_parse_value, which fixes a bug in
this method, which in prior versions caused values of
"0" (zero digit) to be wiped out of the config.
- added tests in t/run.t for the new default config feature.
git-svn-id: http://dev.catalyst.perl.org/repos/Config-General/trunk@25 be1acefe-a474-0410-9a34-9b3221f2030f
2009-10-10 16:19:00 +00:00
|
|
|
1.36
|