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

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

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.

This subclass overrides one of the Config::INI::Reader methods:
set_valueThis 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/',
],
},
}

Chris BinGOs Williams

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.

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