perl_config

Introduction

I am currently writing a few programs that require a simple configuration file to be parsed. I decided to release the bare-bones configuration file parser (under the terms of the GPL of course!) as it's quite a useful tool even in it's early form. This is still very much under-development and doesn't yet include full syntax checking, etc....

Sample Configuration File

perl_config.pl will parse configuration files of the following general form....

# This is a comment - obviously

section_one {
  some_variable = some_value
  another_variable = another_value
}

# another comment
a_free_floating_assignment = "Not in any section"

another_section {
  yet_another_variable = 1234
}
  

Limitations

The configuration file parser contains next-to-nothing in terms of syntax checking at present. I will add this in a later release as I incorporate the parser into my projects. For example, no checking is made for empty assignments, duplicate variable names, duplicate section headers, etc....

Download

You can download the Perl source, a sample configuration file, and of course the README in the following tarball.

Valid CSS!

Valid HTML 4.01!