NAME

App::SmokeBrew::IniFile - Parse the smokebrew configuration file

SYNOPSIS

use App::SmokeBrew::IniFile;

my $cfg = App::SmokeBrew::IniFile->read_file( 'smokebrew.cfg' );

DESCRIPTION

App::SmokeBrew::IniFile is a subclass of Config::INI::Reader which supports multi-valued parameters. Parameters which are specified multiple times will become an arrayref in the resultant hashref structure that is produced.

METHODS

This subclass overrides one of the Config::INI::Reader methods:

set_value

This method is overriden to support multi-valued parameters. If a parameter is specified multiple times the INI file it will become an arrayref.

If 'foo.ini' contains:

  dir=/home/foo
  mirror=http://some.mirror.com/
  mirror=ftp://some.other.mirror.org/CPAN/

my $cfg = App::SmokeBrew::IniFile->read_file( 'foo.ini' );

  $cfg = {
            '_'  => {
                        dir => '/home/foo',

                        mirrors => [
                                      'http://some.mirror.com/',
                                      'ftp://some.other.mirror.org/CPAN/',
                        ],
            },
         }

AUTHOR

Chris BinGOs Williams

LICENSE

Copyright © Chris Williams

This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.

KUDOS

Thanks to Ricardo Signes for pointing out his awesome module to me.

SEE ALSO

Config::INI::Reader