Config::Nested

Parse a configuration file consiging of nested blocks and sections
Download

Config::Nested Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Anthony Fletcher
  • Publisher web site:
  • http://search.cpan.org/~arif/

Config::Nested Tags


Config::Nested Description

Parse a configuration file consiging of nested blocks and sections Config::Nested is a configuration file parser module based on brace delimited blocks and named sections. Section, variable and boolean names are predefined.The result are configuration section hash objects corresponding to the declared sections in the configuration string/file. Each hash contains all the configuration information that is in scope at the end of its block. The hash objects also contain an element '+' that is an array of (section-name, value) pairs tracking which sections contain the current configuration.Array and hash variables accumumlate values as they proceed into deeper and deeper blocks. When the block ends, arrays and hashes revert back to their original value in the outer block.The format is similar (but not idenical) to the ISC named or ISC dhcpd configuration files. It is also similar to the configuration supported by the perl module Config::Scoped except that sections can be nested and arrays do not have to be enclosed by []. Consequently the syntax is simpler and the data structures are less complicated.SYNOPSISuse Config::Nested; use Data::Dumper;my $c = new Config::Nested( section => , boolean => , variable => , array => 'breed exercise owner', hash => 'path', );$c->parseFile($ARGV) || die "failed to parse!\n";my @list = $c->section('animal'); print Dumper(\@list; Requirements: · Perl


Config::Nested Related Software