|
Posted by Karl Gaissmaier on August 3, 2004, 12:35 pm
Please log in for more thread options
I am very pleased to announce a new submission to the CPAN,
Config::Scoped. Comments welcome.
From the README:
NAME
Config:Scoped - feature rich configuration file parser
FEATURES
Config::Scoped has the following highlights as a configuration file
parser:
* Complex recursive datastructures to any extent with scalars,
lists and hashes as elements,
* As a subset parses any complex Perl datastructures
(no references and globs) without *do* or *require*,
* Include files with recursion checks,
* Controlled macro expansion in double quoted tokens,
* Lexically scoped parameter assignments and pragma directives,
* Perl quote like constructs to any extent, '', "", and
here docs <<,
* Perl code evaluation in Safe compartments,
* Caching and restore with MD5 checks to determine
alterations in the original config files,
* Standard macro, parameter, declaration redefinition
validation, may be overridden to validate on semantic
knowledge,
* Standard file permission and ownership safety validation,
may be overridden,
* Fine control for redefiniton warnings with pragma's
and other safety checks,
* Easy inheritable, may be subclassed to build parsers
with specialized validation features,
* Condoning syntax checker, semicolons and or commas are not always
necessary to finish a statement or a list item if the end can be
guessed by other means like newlines, closing brackets,
braces etc.,
* Well spotted messages for syntax errors even within include
files with correct line numbers and file names,
* Exception based error handling,
* etc.,
PREREQUISITES
Parse::RecDescent, Error
Standard modules:
Carp
Storable
File::Spec
File::Basename
Digest::MD5
Safe
APPETIZER
Configuration file example:
# default parameters
community = public;
variables = [ ifInOctets, ifOutOctets ];
oids = {
ifInOctets = 1.3.6.1.2.1.2.2.1.10;
ifOutOctets = 1.3.6.1.2.1.2.2.1.16;
};
%warnings parameter off; ### allow parameter redefinition
# declarations
devices rtr001 {
ports = [ 1, 2, 8, 9 ];
}
devices rtr007 {
community = 'really top secret!';
ports = [ 1, 2, 3, 4 ];
}
INSTALLATION
It's all pure Perl.
perl Makefile.PL
make
make test
make install
AUTHOR
Karl Gaissmaier (karl.gaissmaier@kiz.uni-ulm.de)
COPYRIGHT
Copyright (c) 2004, Karl Gaissmaier. All Rights Reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
--
Karl Gaissmaier KIZ/Infrastructure, University of Ulm, Germany
Email:karl.gaissmaier@kiz.uni-ulm.de Service Group Network
Tel.: ++49 731 50-22499
|
| Similar Threads | Posted | | [ANNOUNCE] Config::Model - Framework for semantic validation of config data | March 20, 2006, 10:07 am |
| ANNOUNCE: Curses interface for Config::Model | May 15, 2007, 7:20 am |
| ANNOUNCE: New release of Curses interface for Config::Model | October 30, 2007, 8:12 am |
| Overriding $Config? | November 4, 2005, 4:50 pm |
| New release of Config-Model | July 24, 2006, 8:20 am |
| New release of Config::Model v 0.612 | August 4, 2007, 11:43 am |
| New version of Config::Model (v0.615) | November 16, 2007, 7:43 am |
| Config::Any fails tests on install | February 24, 2007, 2:49 pm |
| Installing Config::General Failed | October 22, 2007, 12:22 pm |
| RFC: Bridge AppConfig and Config::Model | November 22, 2007, 7:33 am |
|