Config::SimpleSimple configuration file class | |
Download |
Config::Simple Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Sherzod Ruzmetov
- Publisher web site:
- http://author.handalak.com/
Config::Simple Tags
Config::Simple Description
Simple configuration file class Reading and writing configuration files is one of the most frequent tasks of any software design. Config::Simple is the library that helps you with it.Config::Simple is a Perl module representing configuration file object. It supports several configuration file syntax and tries to identify the file syntax automatically. Library supports parsing, updating and creating configuration files.SYNOPSIS use Config::Simple; # --- Simple usage. Loads the config. file into a hash: Config::Simple->import_from('app.ini', \%Config); # --- OO interface: $cfg = new Config::Simple('app.ini'); # accessing values: $user = $cfg->param('User'); # getting the values as a hash: %Config = $cfg->vars(); # updating value with a string $cfg->param('User', 'sherzodR'); # updating a value with an array: $cfg->param('Users', ); # adding a new block to an ini-file: $cfg->param(-block=>'last-access', -values=>{'time'=>time()}); # accessing a block of an ini-file; $mysql = $cfg->param(-block=>'mysql'); # saving the changes back to file: $cfg->save(); # --- tie() interface tie %Config, "Config::Simple", 'app.ini'; Requirements: · Perl
Config::Simple Related Software