Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Config::Nested 2.0.1

    Download button

    No screenshots available
    Downloads: 215  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Anthony Fletcher | More programs
    Perl Artistic License / FREE
    April 16th, 2010, 03:21 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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.

    SYNOPSIS

    use Config::Nested; use Data::Dumper;

    my $c = new Config::Nested( section => [qw( location animal)], boolean => [qw( happy hungry alive)], variable => [qw( sex name colour ) ], array => 'breed exercise owner', hash => 'path', );

    $c->parseFile($ARGV[0]) || die "failed to parse!\n";

    my @list = $c->section('animal'); print Dumper(\@list;



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    configuration parser | nested blocks | Perl module | configuration | parser | nested

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM