lib::Config::Setting(3User Contributed Perl Documentatilib::Config::Setting(3)

       Config::Setting - Perl extension for configuration files.

         use Config::Setting;
         my $stg = Config::Setting->new;
         $stg->get("section", "key");

       This module provides an OO interface to a file full of settings.
       Settings are assumed to be contained in collections (known as
       "sections").  Each setting has a key and a value. The value of a
       setting may refer to other settings using a similiar syntax to
       variables in perl.

       Whilst this module can be used directly it is anticipated that it will
       be subclassed.  This way policy regarding the location and layout of
       the settings can be determined for your project.

       new ( )
           The constructor.  Takes no arguments.

       provider ( )
           Returns an object which can be used to collect the contents of
           files.  The default returns a Setting::FileProvider object.  You
           probably want to override this method when you set up your
           subclass, in order to set the policy for file locations.

       parser ( String, STRING )
           Returns an object which can parse the contents of STRING.  The
           default is the Setting::IniParser object.  You may want to override
           this in a subclass if you wish to use an alternative layout.

       init ( )
           Internal use only.

       merge ( )
           Internal use only.

       sections ( )
           Return a list of which sections are available from this object.

       keylist ( SECTION )
           Return a list of keys that SECTION contains.

       has ( SECTION, KEY )
           Returns true if SECTION contains KEY.

       expand ( )
           Internal use only.

       get ( SECTION, KEY )
           Return the value of KEY in SECTION.  If the value contains any
           variables of the form ${word}, they will be fully expanded in the
           return value.

           When trying to replace a variable "word", first, "word" will be
           looked up as a key in the current section.  If not found, it will
           then be looked up sequentially in all the other sections.  If still
           not found, it will be replaced with an empty string.

           Expansion is recursive, so an expanded variable can contain other

       Dominic Mitchell, <>

       Config::Setting::FileProvider(3), Config::Setting::IniParser(3),

3rd Berkeley Distribution    perl 5.005, patch 03      lib::Config::Setting(3)