ConfigReader::Simple.3pm

Langue: en

Version: 1999-12-09 (debian - 07/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

ConfigReader::Simple - Simple configuration file parser

SYNOPSIS

    use ConfigReader::Simple;
 
 
    $config = ConfigReader::Simple->new("configrc", [qw(Foo Bar Baz Quux)]);
 
 
    $config->parse();
 
 

DESCRIPTION

    C<ConfigReader::Simple> reads and parses simple configuration files.  It's
    designed to be smaller and simpler than the C<ConfigReader> module
    and is more suited to simple configuration files.
 
 

CONSTRUCTOR

new ( FILENAME, DIRECTIVES )
This is the constructor for a new ConfigReader::Simple object.

"FILENAME" tells the instance where to look for the configuration file.

"DIRECTIVES" is a reference to an array. Each member of the array should contain one valid directive.

This does the actual work. No parameters needed.

Returns the parsed value for that directive.

LIMITATIONS/BUGS

Directives are case-sensitive.

If a directive is repeated, the first instance will silently be ignored.

Always die()s on errors instead of reporting them.

"get()" doesn't warn if used before "parse()".

"get()" doesn't warn if you try to acces the value of an unknown directive not know (ie: one that wasn't passed via "new()").

All these will be addressed in future releases.

AUTHOR

Bek Oberin <gossamer@tertius.net.au> Copyright (c) 1998 Bek Oberin. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.