config files
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 10416
Edit Config Files 1.7.5 for Firefox
Edit Config Files is an extension that allows you to edit config files. more>>
Edit Config Files is an extension that allows you to edit config files.
Edit configuration files with your favorite editor from Toolbar or Tools menu.
Remove the menu icon
Add the following to userChrome.css:
#editconfigfiles-menu
{
list-style-image:none !important;
}
<<lessEdit configuration files with your favorite editor from Toolbar or Tools menu.
Remove the menu icon
Add the following to userChrome.css:
#editconfigfiles-menu
{
list-style-image:none !important;
}
Download (0.031MB)
Added: 2007-07-16 License: MPL (Mozilla Public License) Price:
842 downloads
Config::File 1.4
Config::File is a Perl module to parse a simple configuration file. more>>
Config::File is a Perl module to parse a simple configuration file.
SYNOPSIS
use Config::File;
my $config_hash = Config::File::read_config_file($configuration_file);
read_config_file parses a simple configuration file and stores its values in an anonymous hash reference. The syntax of the configuration file is quite simple:
# This is a comment
VALUE_ONE = foo
VALUE_TWO = $VALUE_ONE/bar
VALUE_THREE = The value contains a # (hash). # This is a comment.
Options can be clustered when creating groups:
CLUSTER_ONE[data] = data cluster one
CLUSTER_ONE[value] = value cluster one
CLUSTER_TWO[data] = data cluster two
CLUSTER_TWO[value] = value cluster two
Then values can be fetched using this syntax:
$hash_config->{CLUSTER_ONE}{data};
There can be as many sub-options in a cluster as needed.
BIG_CLUSTER[part1][part2][part3] = data
is fetched by: $hash_config->{BIG_CLUSTER}{part1}{part2}{part3};
There are a couple of restrictions as for the names of the keys. First of all, all the characters should be alphabetic, numeric, underscores or hyphens, with square brackets allowed for the clustering. That is, the keys should conform to /^[A-Za-z0-9_-]+$/
This means also that no space is allowed in the key part of the line.
CLUSTER_ONE[data] = data cluster one # Right
CLUSTER_ONE[ data ] = data cluster one # Wrong
<<lessSYNOPSIS
use Config::File;
my $config_hash = Config::File::read_config_file($configuration_file);
read_config_file parses a simple configuration file and stores its values in an anonymous hash reference. The syntax of the configuration file is quite simple:
# This is a comment
VALUE_ONE = foo
VALUE_TWO = $VALUE_ONE/bar
VALUE_THREE = The value contains a # (hash). # This is a comment.
Options can be clustered when creating groups:
CLUSTER_ONE[data] = data cluster one
CLUSTER_ONE[value] = value cluster one
CLUSTER_TWO[data] = data cluster two
CLUSTER_TWO[value] = value cluster two
Then values can be fetched using this syntax:
$hash_config->{CLUSTER_ONE}{data};
There can be as many sub-options in a cluster as needed.
BIG_CLUSTER[part1][part2][part3] = data
is fetched by: $hash_config->{BIG_CLUSTER}{part1}{part2}{part3};
There are a couple of restrictions as for the names of the keys. First of all, all the characters should be alphabetic, numeric, underscores or hyphens, with square brackets allowed for the clustering. That is, the keys should conform to /^[A-Za-z0-9_-]+$/
This means also that no space is allowed in the key part of the line.
CLUSTER_ONE[data] = data cluster one # Right
CLUSTER_ONE[ data ] = data cluster one # Wrong
Download (0.004MB)
Added: 2007-04-12 License: Perl Artistic License Price:
928 downloads
Config::IniFiles 2.38
Config::IniFiles is a module for reading .ini-style configuration files. more>>
Config::IniFiles is a module for reading .ini-style configuration files.
SYNOPSIS
use Config::IniFiles;
my $cfg = new Config::IniFiles( -file => "/path/configfile.ini" );
print "The value is " . $cfg->val( Section, Parameter ) . "."
if $cfg->val( Section, Parameter );
Config::IniFiles provides a way to have readable configuration files outside your Perl script. Configurations can be imported (inherited, stacked,...), sections can be grouped, and settings can be accessed from a tied hash.
FILE FORMAT
INI files consist of a number of sections, each preceded with the section name in square brackets. The first non-blank character of the line indicating a section must be a left bracket and the last non-blank character of a line indicating a section must be a right bracket. The characters making up the section name can be any symbols at all. However section names must be unique.
Parameters are specified in each section as Name=Value. Any spaces around the equals sign will be ignored, and the value extends to the end of the line. Parameter names are localized to the namespace of the section, but must be unique within a section.
[section]
Parameter=Value
Both the hash mark (#) and the semicolon (;) are comment characters. by default (this can be changed by configuration) Lines that begin with either of these characters will be ignored. Any amount of whitespace may precede the comment character.
Multi-line or multi-valued parameters may also be defined ala UNIX "here document" syntax:
Parameter=<<less
SYNOPSIS
use Config::IniFiles;
my $cfg = new Config::IniFiles( -file => "/path/configfile.ini" );
print "The value is " . $cfg->val( Section, Parameter ) . "."
if $cfg->val( Section, Parameter );
Config::IniFiles provides a way to have readable configuration files outside your Perl script. Configurations can be imported (inherited, stacked,...), sections can be grouped, and settings can be accessed from a tied hash.
FILE FORMAT
INI files consist of a number of sections, each preceded with the section name in square brackets. The first non-blank character of the line indicating a section must be a left bracket and the last non-blank character of a line indicating a section must be a right bracket. The characters making up the section name can be any symbols at all. However section names must be unique.
Parameters are specified in each section as Name=Value. Any spaces around the equals sign will be ignored, and the value extends to the end of the line. Parameter names are localized to the namespace of the section, but must be unique within a section.
[section]
Parameter=Value
Both the hash mark (#) and the semicolon (;) are comment characters. by default (this can be changed by configuration) Lines that begin with either of these characters will be ignored. Any amount of whitespace may precede the comment character.
Multi-line or multi-valued parameters may also be defined ala UNIX "here document" syntax:
Parameter=<<less
Download (0.036MB)
Added: 2006-06-15 License: Perl Artistic License Price:
1226 downloads
Config Maker 0.2
Config Maker is a tool to automatically create C++ classes that parse configuration files. more>>
Config Maker is a tool to automatically create C++ classes that parse configuration files.
Only a few lines of text that describe the possible entries in the configuration file are needed, and the complete class will be generated ready for use.
Basic usage
The input files for Config Maker have a very simple structure (in ANTLR/grep like notation):
objectname (configentry)+
Each configentry looks like this
type entryname defaultvalue (comment)?
type
Type of the entry, can be int, double, string or bool. If the basic type is followed by any number, the corresponding c++object variable will be of type vector < basic type > The number is the initial number of elements that are allocated for the vector, but the actual configuration file can contain more components. These are added using the push_back method.
If there are less elements specified in the configuration file, the object variable will still contain the number of elements specified here. No warning will be issued.
configentry
Name of the entry and corresponding variable. Has to be at least two characters long and can contain characters and numbers. Case insensitive.
defaultvalue
Default value for the entry. This is optional.
comment
Each comment starts with // and is completely ignored
<<lessOnly a few lines of text that describe the possible entries in the configuration file are needed, and the complete class will be generated ready for use.
Basic usage
The input files for Config Maker have a very simple structure (in ANTLR/grep like notation):
objectname (configentry)+
Each configentry looks like this
type entryname defaultvalue (comment)?
type
Type of the entry, can be int, double, string or bool. If the basic type is followed by any number, the corresponding c++object variable will be of type vector < basic type > The number is the initial number of elements that are allocated for the vector, but the actual configuration file can contain more components. These are added using the push_back method.
If there are less elements specified in the configuration file, the object variable will still contain the number of elements specified here. No warning will be issued.
configentry
Name of the entry and corresponding variable. Has to be at least two characters long and can contain characters and numbers. Case insensitive.
defaultvalue
Default value for the entry. This is optional.
comment
Each comment starts with // and is completely ignored
Download (0.30MB)
Added: 2007-03-20 License: GPL (GNU General Public License) Price:
955 downloads
Config::Fast 1.07
Config::Fast is an extremely fast configuration file parser. more>>
Config::Fast is an extremely fast configuration file parser.
SYNOPSIS
# default config format is a space-separated file
company "Supercool, Inc."
support nobody@nowhere.com
# and then in Perl
use Config::Fast;
%cf = fastconfig;
print "Thanks for visiting $cf{company}!n";
print "Please contact $cf{support} for support.n";
This module is designed to provide an extremely lightweight way to parse moderately complex configuration files. As such, it exports a single function - fastconfig() - and does not provide any OO access methods. Still, it is fairly full-featured.
Heres how it works:
%cf = fastconfig($file, $delim);
Basically, the fastconfig() function returns a hash of keys and values based on the directives in your configuration file. By default, directives and values are separated by whitespace in the config file, but this can be easily changed with the delimiter argument (see below).
When the configuration file is read, its modification time is first checked and the results cached. On each call to fastconfig(), if the config file has been changed, then the file is reread. Otherwise, the cached results are returned automatically. This makes this module great for mod_perl modules and scripts, one of the primary reasons I wrote it. Simply include this at the top of your script or inside of your constructor function:
my %cf = fastconfig(/path/to/config/file.conf);
If the file argument is omitted, then fastconfig() looks for a file named $0.conf in the ../etc directory relative to the executable. For example, if you ran:
/usr/local/bin/myapp
Then fastconfig() will automatically look for:
/usr/local/etc/myapp.conf
This is great if youre really lazy and always in a hurry, like I am.
If this doesnt work for you, simply supply a filename manually. Note that filename generation does not work in mod_perl, so youll need to supply a filename manually.
<<lessSYNOPSIS
# default config format is a space-separated file
company "Supercool, Inc."
support nobody@nowhere.com
# and then in Perl
use Config::Fast;
%cf = fastconfig;
print "Thanks for visiting $cf{company}!n";
print "Please contact $cf{support} for support.n";
This module is designed to provide an extremely lightweight way to parse moderately complex configuration files. As such, it exports a single function - fastconfig() - and does not provide any OO access methods. Still, it is fairly full-featured.
Heres how it works:
%cf = fastconfig($file, $delim);
Basically, the fastconfig() function returns a hash of keys and values based on the directives in your configuration file. By default, directives and values are separated by whitespace in the config file, but this can be easily changed with the delimiter argument (see below).
When the configuration file is read, its modification time is first checked and the results cached. On each call to fastconfig(), if the config file has been changed, then the file is reread. Otherwise, the cached results are returned automatically. This makes this module great for mod_perl modules and scripts, one of the primary reasons I wrote it. Simply include this at the top of your script or inside of your constructor function:
my %cf = fastconfig(/path/to/config/file.conf);
If the file argument is omitted, then fastconfig() looks for a file named $0.conf in the ../etc directory relative to the executable. For example, if you ran:
/usr/local/bin/myapp
Then fastconfig() will automatically look for:
/usr/local/etc/myapp.conf
This is great if youre really lazy and always in a hurry, like I am.
If this doesnt work for you, simply supply a filename manually. Note that filename generation does not work in mod_perl, so youll need to supply a filename manually.
Download (0.010MB)
Added: 2007-08-11 License: Perl Artistic License Price:
805 downloads
ConfigFile for Haskell 1.0.0
ConfigFile for Haskell is a configuration file parser and writer library for Haskell. more>>
ConfigFile for Haskell is a configuration file parser and writer library for Haskell.
The ConfigFile module works with configuration files in a standard format that is easy for the user to edit, easy for the programmer to work with, yet remains powerful and flexible. It is inspired by, and compatible with, Pythons ConfigParser module. It uses files that resemble Windows .INI-style files, but with numerous improvements.
ConfigFile provides simple calls to both read and write config files. Its possible to make a config file parsable by this module, the Unix shell, and make.
Enhancements:
- This package was formerly part of MissingH and is being split off as part of the MissingH transition plan.
<<lessThe ConfigFile module works with configuration files in a standard format that is easy for the user to edit, easy for the programmer to work with, yet remains powerful and flexible. It is inspired by, and compatible with, Pythons ConfigParser module. It uses files that resemble Windows .INI-style files, but with numerous improvements.
ConfigFile provides simple calls to both read and write config files. Its possible to make a config file parsable by this module, the Unix shell, and make.
Enhancements:
- This package was formerly part of MissingH and is being split off as part of the MissingH transition plan.
Download (0.034MB)
Added: 2006-12-11 License: LGPL (GNU Lesser General Public License) Price:
1047 downloads
Xmms::Config 0.12
Xmms::Config is a Perl Interface to xmms_cfg API. more>>
Xmms::Config is a Perl Interface to xmms_cfg API.
SYNOPSIS
my $file = Xmms::Config->file; #$ENV{HOME}/.xmms/config
my $cfg = Xmms::Config->new($file);
<<lessSYNOPSIS
my $file = Xmms::Config->file; #$ENV{HOME}/.xmms/config
my $cfg = Xmms::Config->new($file);
Download (0.18MB)
Added: 2007-04-23 License: Perl Artistic License Price:
914 downloads
Config::Sofu 0.3
Config::Sofu is a simple Sofu configuration file parser. more>>
Config::Sofu is a simple Sofu configuration file parser.
SYNOPSIS
use vars qw/%CONFIG/;
use Config::Sofu "config.sofu";
if ($CONFIG{FOOBAR}) {
...
}
if ($CONFIG{Bar}->[7]->{Foo} eq "Foobar") {
...
}
Save the new configuration:
$CONFIG{FOOBAR}="Bar times Foo";
Config::Sofu::save;
or
Config::Sofu::save(%CompletlyNewConfig)
SYNTAX
This class exports the hash %CONFIG by default which contains all the information of the file which is given to the use statement.
<<lessSYNOPSIS
use vars qw/%CONFIG/;
use Config::Sofu "config.sofu";
if ($CONFIG{FOOBAR}) {
...
}
if ($CONFIG{Bar}->[7]->{Foo} eq "Foobar") {
...
}
Save the new configuration:
$CONFIG{FOOBAR}="Bar times Foo";
Config::Sofu::save;
or
Config::Sofu::save(%CompletlyNewConfig)
SYNTAX
This class exports the hash %CONFIG by default which contains all the information of the file which is given to the use statement.
Download (0.002MB)
Added: 2007-04-12 License: Perl Artistic License Price:
925 downloads
DNS::Config 0.66
DNS::Config is a Perl module with DNS Configuration. more>>
DNS::Config is a Perl module with DNS Configuration.
SYNOPSIS
use DNS::Config;
my $config = new DNS::Config();
$config->debug();
ABSTRACT
This class represents a configuration for a domain name service daemon (DNS).
A domain name service daemon configuration knows about the zone information actively provided to the service users as well as lots of other configuration data.
This class allows to represent this configuration data in a more or less generic way. Another class, the file adaptor, then knows how to write the information to a file in a daemon specific format.
So far this class is strongly related to the ISCs Bind domain name service daemon but it is inteded to get more generic in upcoming releases. Your help is welcome.
<<lessSYNOPSIS
use DNS::Config;
my $config = new DNS::Config();
$config->debug();
ABSTRACT
This class represents a configuration for a domain name service daemon (DNS).
A domain name service daemon configuration knows about the zone information actively provided to the service users as well as lots of other configuration data.
This class allows to represent this configuration data in a more or less generic way. Another class, the file adaptor, then knows how to write the information to a file in a daemon specific format.
So far this class is strongly related to the ISCs Bind domain name service daemon but it is inteded to get more generic in upcoming releases. Your help is welcome.
Download (0.014MB)
Added: 2007-04-16 License: Perl Artistic License Price:
926 downloads
ConfigReader::Simple 1.25
ConfigReader::Simple is a simple configuration file parser. more>>
ConfigReader::Simple is a simple configuration file parser.
SYNOPSIS
use ConfigReader::Simple;
# parse one file
$config = ConfigReader::Simple->new("configrc", [qw(Foo Bar Baz Quux)]);
# parse multiple files, in order
$config = ConfigReader::Simple->new_multiple(
Files => [ "global", "configrc" ],
Keys => [qw(Foo Bar Baz Quux)]
);
my @directives = $config->directives;
$config->get( "Foo" );
if( $config->exists( "Bar" ) )
{
print "Bar was in the config filen";
}
# copy an object to play with it separately
my $clone = $config->clone;
# only affects clone
$clone->set( "Foo", "Buster" );
# save the config to a single file
$clone->save( "configrc" )
# save the config to a single file, but only with
# certain directives
$clone->save( "configrc" => [qw(Foo Bar)] )
# save to multiple configuration files
$clone->save(
"configrc" => [qw(Foo Bar)],
"global" => [qw(Baz Quux)],
);
ConfigReader::Simple reads and parses simple configuration files. It is designed to be smaller and simpler than the ConfigReader module and is more suited to simple configuration files.
<<lessSYNOPSIS
use ConfigReader::Simple;
# parse one file
$config = ConfigReader::Simple->new("configrc", [qw(Foo Bar Baz Quux)]);
# parse multiple files, in order
$config = ConfigReader::Simple->new_multiple(
Files => [ "global", "configrc" ],
Keys => [qw(Foo Bar Baz Quux)]
);
my @directives = $config->directives;
$config->get( "Foo" );
if( $config->exists( "Bar" ) )
{
print "Bar was in the config filen";
}
# copy an object to play with it separately
my $clone = $config->clone;
# only affects clone
$clone->set( "Foo", "Buster" );
# save the config to a single file
$clone->save( "configrc" )
# save the config to a single file, but only with
# certain directives
$clone->save( "configrc" => [qw(Foo Bar)] )
# save to multiple configuration files
$clone->save(
"configrc" => [qw(Foo Bar)],
"global" => [qw(Baz Quux)],
);
ConfigReader::Simple reads and parses simple configuration files. It is designed to be smaller and simpler than the ConfigReader module and is more suited to simple configuration files.
Download (0.011MB)
Added: 2007-04-12 License: Perl Artistic License Price:
934 downloads
Config::Std 0.0.4
Config::Std is a Perl module load and save configuration files in a standard format. more>>
Config::Std is a Perl module load and save configuration files in a standard format.
SYNOPSIS
use Config::Std;
# Load named config file into specified hash...
read_config demo2.cfg => my %config;
# Extract the value of a key/value pair from a specified section...
$config_value = $config{Section_label}{key};
# Change (or create) the value of a key/value pair...
$config{Other_section_label}{other_key} = $new_val;
# Update the config file from which this hash was loaded...
write_config %config;
# Write the config information to another file as well...
write_config %config, $other_file_name;
This module implements yet another damn configuration-file system.
The configuration language is deliberately simple and limited, and the module works hard to preserve as much information (section order, comments, etc.) as possible when a configuration file is updated.
See Chapter 19 of "Perl Best Practices" (OReilly, 2005) for the rationale for this approach.
<<lessSYNOPSIS
use Config::Std;
# Load named config file into specified hash...
read_config demo2.cfg => my %config;
# Extract the value of a key/value pair from a specified section...
$config_value = $config{Section_label}{key};
# Change (or create) the value of a key/value pair...
$config{Other_section_label}{other_key} = $new_val;
# Update the config file from which this hash was loaded...
write_config %config;
# Write the config information to another file as well...
write_config %config, $other_file_name;
This module implements yet another damn configuration-file system.
The configuration language is deliberately simple and limited, and the module works hard to preserve as much information (section order, comments, etc.) as possible when a configuration file is updated.
See Chapter 19 of "Perl Best Practices" (OReilly, 2005) for the rationale for this approach.
Download (0.012MB)
Added: 2007-01-18 License: Perl Artistic License Price:
1009 downloads
App::Conf::File 0.965
App::Conf::File is a Perl module to load and access configuration data. more>>
App::Conf::File is a Perl module to load and access configuration data.
SYNOPSIS
use App::Conf;
$config = App::Conf->new();
$config = App::Conf->new(configFile => $file);
print $config->dump(), "n"; # use Data::Dumper to spit out the Perl representation
# accessors
$property_value = $config->get($property_name);
$branch = $config->get_branch($branch_name); # get hashref of properties
# on-demand loading helper methods (private methods)
$config->overlay($config2); # merge the two config structures using overlay rules
$config->overlay($config1, $config2); # merge $config2 onto $config1
$config->graft($branch_name, $config2); # graft new config structure onto branch
# By convention, the configurations for each App-Context service will be located
# two levels under the hash ref as shown.
$config->{Conf} # config settings for all Conf services
$config->{Conf}{default} # config settings for the default Conf service
$config->{Security} # config settings for all Security services
$config->{Security}{default} # config settings for the default Security service
$config->{Template}{tt} # config settings for the Template service named "tt"
# The default driver (if "configClass" not supplied) reads in a Perl
# data structure from the file. Alternate drivers can read a Storable,
# unvalidated XML, DTD-validated XML, RDF-validated XML, or any other
# file format or data source anyone cares to write a driver for.
$conf = {
Standard => {
Log-Dispatch => {
logdir => /var/p5ee,
}
},
Authen => {
passwd => /etc/passwd,
seed => 303292,
},
};
# A comparable unvalidating XML file would look like this.
< conf>
< Standard>
< Log-Dispatch logdir="/var/p5ee"/>
< /Standard>
< Authen passwd="/etc/passwd" seed="303292"/>
< /conf>
# A comparable ini file (.ini) would look like this.
[Standard.Log-Dispatch]
logdir = /var/p5ee
[Authen]
passwd = /etc/passwd
seed = 303292
# A comparable Java properties-like file would look like this.
Standard.Log-Dispatch.logdir = /var/p5ee
Authen.passwd = /etc/passwd
Authen.seed = 303292
<<lessSYNOPSIS
use App::Conf;
$config = App::Conf->new();
$config = App::Conf->new(configFile => $file);
print $config->dump(), "n"; # use Data::Dumper to spit out the Perl representation
# accessors
$property_value = $config->get($property_name);
$branch = $config->get_branch($branch_name); # get hashref of properties
# on-demand loading helper methods (private methods)
$config->overlay($config2); # merge the two config structures using overlay rules
$config->overlay($config1, $config2); # merge $config2 onto $config1
$config->graft($branch_name, $config2); # graft new config structure onto branch
# By convention, the configurations for each App-Context service will be located
# two levels under the hash ref as shown.
$config->{Conf} # config settings for all Conf services
$config->{Conf}{default} # config settings for the default Conf service
$config->{Security} # config settings for all Security services
$config->{Security}{default} # config settings for the default Security service
$config->{Template}{tt} # config settings for the Template service named "tt"
# The default driver (if "configClass" not supplied) reads in a Perl
# data structure from the file. Alternate drivers can read a Storable,
# unvalidated XML, DTD-validated XML, RDF-validated XML, or any other
# file format or data source anyone cares to write a driver for.
$conf = {
Standard => {
Log-Dispatch => {
logdir => /var/p5ee,
}
},
Authen => {
passwd => /etc/passwd,
seed => 303292,
},
};
# A comparable unvalidating XML file would look like this.
< conf>
< Standard>
< Log-Dispatch logdir="/var/p5ee"/>
< /Standard>
< Authen passwd="/etc/passwd" seed="303292"/>
< /conf>
# A comparable ini file (.ini) would look like this.
[Standard.Log-Dispatch]
logdir = /var/p5ee
[Authen]
passwd = /etc/passwd
seed = 303292
# A comparable Java properties-like file would look like this.
Standard.Log-Dispatch.logdir = /var/p5ee
Authen.passwd = /etc/passwd
Authen.seed = 303292
Download (0.12MB)
Added: 2007-06-21 License: Perl Artistic License Price:
856 downloads
Config::Framework 2.5
Config::Framework is a Perl module with handy one-stop shopping for (most) of your configuration file needs. more>>
Config::Framework is a Perl module with handy one-stop shopping for (most) of your configuration file needs.
SYNOPSIS
#create a new object, load two configuration files and decrypt the passwords. my $Object = new Config::Framework( Files => [ApplicationCfg.xml,UserCfg.xml], GetSecure => 1 ) || die $Config::Framework::errstr;
#change some data in one of the loaded configs $Object->{UserCfg}->{backgroundColor} = #00CCFF;
#write that change back to the file you loaded it from $Object->WriteConfig(configNamespace => "UserCfg") || die $Object->{errstr};
#Define a new configuration namespace %{ $Object->{newConfig} } = ( configNamespace => "newConfig", protectNamespace => 1, Version => 1, #arbitrary data keys follow backgroundColor => #006699, getRecords => 10, followLinks => 1, someThing => "in a bag" );
#Write your new configuration data out to an encrypted file #under the applications ApplicationFramework directory $Object->WriteConfig( configNamespace => "newConfig", Encrypt => 1, Crypt => "Rijndael", Key => "l33tp4sw3rd" File => "$Object->{FrameworkDir}/newConfig.xml" ) || die $Object->{errstr};
At long last I have decided to re-write the documentation for Config::Framework, in a manner which should be comprehensible by people other than myself. I would like to offer my sincerest appologies to anyone who tried to comprehend the sprawling stream-of-consiousness rant that was the previous documentation. Im sorry, I wasnt trying to make you insane. Now on with the show.
Ok so what is Config::Framework? Its a handy module for dealing with situations where you need your program to be able to load external data from a file that controls how your program operates. Im talking about configuration files here. So what do you do in a situation like that? Well you figure out a format to store your configuration parameters in, then write routines to read that format and put it some sort of meaningful data structure, and to write data from the data structure back out to the file.
Wouldnt it be nice if someone defined a standard config file format so that you wouldnt need to write your own parser? Well in the end, all a config file really is, is an arbitrary data structure expressed in in ascii. A standard way of serializing data structures in ascii you say? That sounds a bit like XML! Well the Data::DumpXML module will serialize perl data structures into XML and restore them for you, and you could certainly dump that to a file easily enough.
Ok getting to the point. The main thing that Config::Framework does for you is to define a standard data structure (or at least some standard guidelines for your data structure) and then front-ends Data::DumpXML so that you can arbitrarily dump and restore these data structures to files.
While were at it, Config::Framework aspires to be your one-stop-shop for config-type-stuff, by helping you stay organized in the way you handle external configuration data.
<<lessSYNOPSIS
#create a new object, load two configuration files and decrypt the passwords. my $Object = new Config::Framework( Files => [ApplicationCfg.xml,UserCfg.xml], GetSecure => 1 ) || die $Config::Framework::errstr;
#change some data in one of the loaded configs $Object->{UserCfg}->{backgroundColor} = #00CCFF;
#write that change back to the file you loaded it from $Object->WriteConfig(configNamespace => "UserCfg") || die $Object->{errstr};
#Define a new configuration namespace %{ $Object->{newConfig} } = ( configNamespace => "newConfig", protectNamespace => 1, Version => 1, #arbitrary data keys follow backgroundColor => #006699, getRecords => 10, followLinks => 1, someThing => "in a bag" );
#Write your new configuration data out to an encrypted file #under the applications ApplicationFramework directory $Object->WriteConfig( configNamespace => "newConfig", Encrypt => 1, Crypt => "Rijndael", Key => "l33tp4sw3rd" File => "$Object->{FrameworkDir}/newConfig.xml" ) || die $Object->{errstr};
At long last I have decided to re-write the documentation for Config::Framework, in a manner which should be comprehensible by people other than myself. I would like to offer my sincerest appologies to anyone who tried to comprehend the sprawling stream-of-consiousness rant that was the previous documentation. Im sorry, I wasnt trying to make you insane. Now on with the show.
Ok so what is Config::Framework? Its a handy module for dealing with situations where you need your program to be able to load external data from a file that controls how your program operates. Im talking about configuration files here. So what do you do in a situation like that? Well you figure out a format to store your configuration parameters in, then write routines to read that format and put it some sort of meaningful data structure, and to write data from the data structure back out to the file.
Wouldnt it be nice if someone defined a standard config file format so that you wouldnt need to write your own parser? Well in the end, all a config file really is, is an arbitrary data structure expressed in in ascii. A standard way of serializing data structures in ascii you say? That sounds a bit like XML! Well the Data::DumpXML module will serialize perl data structures into XML and restore them for you, and you could certainly dump that to a file easily enough.
Ok getting to the point. The main thing that Config::Framework does for you is to define a standard data structure (or at least some standard guidelines for your data structure) and then front-ends Data::DumpXML so that you can arbitrarily dump and restore these data structures to files.
While were at it, Config::Framework aspires to be your one-stop-shop for config-type-stuff, by helping you stay organized in the way you handle external configuration data.
Download (0.015MB)
Added: 2006-09-26 License: Perl Artistic License Price:
1125 downloads
MRTG::Config 0.04
MRTG::Config is a Perl module for parsing MRTG configuration files. more>>
MRTG::Config is a Perl module for parsing MRTG configuration files.
WARNING
This module, while reliable right now, is still in ALPHA stages of development... The API/methods may change. Behaviors of methods will almost certainly change. The internal structure of data will change, as will many other things.
I will try to always release working versions, but anyone who expects their code that uses this module to continue working shouldnt... until I remove this warning.
SYNOPSIS
Ever have the need to parse an MRTG config file? I have. I needed to parse lots and lots of them. Using the functions built-in to MRTG_lib was too slow, too complex, and used too much RAM and CPU time for my poor web server to handle - and the data structures MRTG_lib built were way more complex than I needed.
MRTG::Config can load and parse MRTG and MRTG-style confiuguration files very quickly, and the parsed directives, targets and values can be located, extracted, and manipulated through an OO interface.
This module is intended to focus on correctly parsing the format of an MRTG configuration, regardless of whether or not the directives and values, etc. are valid for MRTG. I am using both the parsing behavior of MRTG_libs readcfg() function and the description of the format on the MRTG website as my guidelines on how to correctly parse these configuration files. I am still a short way off that goal, but this module is currently being used in a production environment with great success!
PLEA FOR MERCY
I plan on adding to this documentation and making it better organized soon, but Im willing to answer questions directly in the mean time. Also, this is my first module, written in a hurry to appease some disgruntled engineers. I do plan on continuing to improve it, so any input, positive or negative is certainly welcome!
USAGE EXAMPLE
use MRTG::Config;
my $cfgFile = mrtg.cfg;
my $persist_file = mrtg.cfg.db;
my $mrtgCfg = new MRTG::Config;
$mrtgCfg->loadparse($cfgFile);
# Want to store the parsed data for use later or by
# another program?
$mrtgCfg->persist_file($persist_file);
$mrtgCfg->persist(1);
foreach my $tgtName (@{$mrtgCfg->targets()}) {
my $tgtCfg = $mrtgCfg->target($tgtName);
# Lets assume every target has a Title.
print $tgtCfg->{title} . "n";
}
# globals() has some, um, interesting things you
# should know. Please read about it below...
my $globalCfg = $mrtgCfg->globals();
# Lets assume WorkDir is set.
print $globalCfg->{workdir} . "n";
<<lessWARNING
This module, while reliable right now, is still in ALPHA stages of development... The API/methods may change. Behaviors of methods will almost certainly change. The internal structure of data will change, as will many other things.
I will try to always release working versions, but anyone who expects their code that uses this module to continue working shouldnt... until I remove this warning.
SYNOPSIS
Ever have the need to parse an MRTG config file? I have. I needed to parse lots and lots of them. Using the functions built-in to MRTG_lib was too slow, too complex, and used too much RAM and CPU time for my poor web server to handle - and the data structures MRTG_lib built were way more complex than I needed.
MRTG::Config can load and parse MRTG and MRTG-style confiuguration files very quickly, and the parsed directives, targets and values can be located, extracted, and manipulated through an OO interface.
This module is intended to focus on correctly parsing the format of an MRTG configuration, regardless of whether or not the directives and values, etc. are valid for MRTG. I am using both the parsing behavior of MRTG_libs readcfg() function and the description of the format on the MRTG website as my guidelines on how to correctly parse these configuration files. I am still a short way off that goal, but this module is currently being used in a production environment with great success!
PLEA FOR MERCY
I plan on adding to this documentation and making it better organized soon, but Im willing to answer questions directly in the mean time. Also, this is my first module, written in a hurry to appease some disgruntled engineers. I do plan on continuing to improve it, so any input, positive or negative is certainly welcome!
USAGE EXAMPLE
use MRTG::Config;
my $cfgFile = mrtg.cfg;
my $persist_file = mrtg.cfg.db;
my $mrtgCfg = new MRTG::Config;
$mrtgCfg->loadparse($cfgFile);
# Want to store the parsed data for use later or by
# another program?
$mrtgCfg->persist_file($persist_file);
$mrtgCfg->persist(1);
foreach my $tgtName (@{$mrtgCfg->targets()}) {
my $tgtCfg = $mrtgCfg->target($tgtName);
# Lets assume every target has a Title.
print $tgtCfg->{title} . "n";
}
# globals() has some, um, interesting things you
# should know. Please read about it below...
my $globalCfg = $mrtgCfg->globals();
# Lets assume WorkDir is set.
print $globalCfg->{workdir} . "n";
Download (0.012MB)
Added: 2007-07-26 License: Perl Artistic License Price:
824 downloads
PXP::Config 0.1.2
PXP::Config is a Perl module for PXP configuration. more>>
PXP::Config is a Perl module for PXP configuration.
SYNOPSIS
# do this only once at server initialization:
PXP::Config::init(file=>$finename);
# then from anywhere:
my $global_configuration_hash = PXP::Config::getGlobal();
# only from a plugin class:
my $plugin_configuration_hash = PXP::Config::get();
PXP::Config is a PXP component which provides a unified and simplified API for the PXP server and PXP plugins to read and store there configuration.
PXP::Config uses the XML::Simple module to access a centralized XML configuration file. This file (/opt/etc/imc.xml by default) contains root element named imc which has a global child for the PXP server configuration and a plugins child which has itself a child per plugin configuration (the child name must be the plugin name for this class to automatically retrieve a plugin configuration.
As plugins configurations are retrived by plugin name in a centralized location, the only thing a plugin has to do in order to get its configuration is to call the PXP::Config::get() method which returns a hash convertion of the plugin XML configuration.
Configuring plugins can be made in two manners:
1) the simple way - use it when you dont need to update the configuration from the application itself and when your plugin configuration has a very simple structure:
simply add a tag with the name of your plugin in the etc/imc.xml file, the plugin configuration can then be accessed as a has by calling the PXP::Config::get() method
2) the sophisticated way - use it in other cases:
create a new package in a file MyConfig/PLUGIN_NAME.pm under your plugin directory
in this file, define a package that inherits from PXP::MyConfig class and which overrode the config, loadFile and synchro methods (see plugins/LogViewer/MyConfig/LogViewer.pm for an example)
edit your plugin.xml and add your new package as an extension to the PXP::MyConfig extension point:
< extension
id="MyConfig::LogViewer"
name="Plugin configuration"
version="0.1"
point="IMC::MyConfig"/ >
< file value=/tmp/imc.xml/ >
< /extension >
You can ommit the file tag, configuration file will then default to the main configuration file (the one passed to the server with the -c switch or etc/imc.xml by default).
See the PXP::Config and PXP::MyConfig APIs for using configuration inside plugins.
<<lessSYNOPSIS
# do this only once at server initialization:
PXP::Config::init(file=>$finename);
# then from anywhere:
my $global_configuration_hash = PXP::Config::getGlobal();
# only from a plugin class:
my $plugin_configuration_hash = PXP::Config::get();
PXP::Config is a PXP component which provides a unified and simplified API for the PXP server and PXP plugins to read and store there configuration.
PXP::Config uses the XML::Simple module to access a centralized XML configuration file. This file (/opt/etc/imc.xml by default) contains root element named imc which has a global child for the PXP server configuration and a plugins child which has itself a child per plugin configuration (the child name must be the plugin name for this class to automatically retrieve a plugin configuration.
As plugins configurations are retrived by plugin name in a centralized location, the only thing a plugin has to do in order to get its configuration is to call the PXP::Config::get() method which returns a hash convertion of the plugin XML configuration.
Configuring plugins can be made in two manners:
1) the simple way - use it when you dont need to update the configuration from the application itself and when your plugin configuration has a very simple structure:
simply add a tag with the name of your plugin in the etc/imc.xml file, the plugin configuration can then be accessed as a has by calling the PXP::Config::get() method
2) the sophisticated way - use it in other cases:
create a new package in a file MyConfig/PLUGIN_NAME.pm under your plugin directory
in this file, define a package that inherits from PXP::MyConfig class and which overrode the config, loadFile and synchro methods (see plugins/LogViewer/MyConfig/LogViewer.pm for an example)
edit your plugin.xml and add your new package as an extension to the PXP::MyConfig extension point:
< extension
id="MyConfig::LogViewer"
name="Plugin configuration"
version="0.1"
point="IMC::MyConfig"/ >
< file value=/tmp/imc.xml/ >
< /extension >
You can ommit the file tag, configuration file will then default to the main configuration file (the one passed to the server with the -c switch or etc/imc.xml by default).
See the PXP::Config and PXP::MyConfig APIs for using configuration inside plugins.
Download (0.014MB)
Added: 2006-09-19 License: Perl Artistic License Price:
1134 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above config files search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed