Customisable configuration file reader with [ini] file default capability.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2021-02-18 16:50:30 +00:00
lib/Config Adjust docs 2017-08-11 23:23:48 +01:00
test Initial Checkin 2017-08-11 00:18:49 +01:00
Makefile.PL Correct URLs in Makefile.PL 2021-02-18 16:50:30 +00:00
README.md Initial Checkin 2017-08-11 00:18:49 +01:00

NAME

Config::Custom - A configuration file reader

VERSION

version 1.00

SYNOPSIS

$set = Config::Custom->new;

$set->read_configuration_file( $filename );

DESCRIPTION

Config::Custom is a set of modules to read, write and interrogate configuration files. By default these files are assumed to be in Windows .ini format. That is, line based, KEY=VALUE format in sections marked by [SECTION_NAME] lines and with # based line comments.

PROPERTIES

  • configuration_filename

    The configuration filename.

METHODS

File Access

  • read_configuration_file( [filename] )

    Reads the defined configuration file. Optionally setting the configuration_filename at the same time in which case the file must exist.

  • write_configuration_file

    Writes the current configuration to file specified by the configuration_filename property.

Lookup

  • value_for_section_key( section, key )

    Retrieves the value under the given section and key

  • get_section( section_name )

    Returns the section object of the given name or undef.

Options Handling -

  • add_option

    Passes the supplied arguments to the Bkup::Set::Options add_option method.

  • option

    Retrieve the requested option values based on supplied key. add_option method.

Target Handling

  • add_target

    Add a Bkup::Set::Target object to the current set.

  • target

    Get a Bkup::Set::Target object based on target id.

  • targets

    Return an array of the Bkup::Set::Target objects.

Source Subdirectory Handling

  • add_source

    Add a Bkup::Set::Source object to the current set.

  • source

    Get a Bkup::Set::Source object based on target id.

  • sources

    Return an array of the Bkup::Set::Source objects.

COMPATIBILITY

  • Bkup::Set is composed of the following objects.

      C<Bkup::Set::Targets>
      C<Bkup::Set::Sources>
      C<Bkup::Set::Options>
      C<Bkup::Comment>
    

AUTHOR

Bernard Quatermass toolsmith@quatermass.co.uk

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Bernard Quatermass.

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