The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenInteract2::Config::IniFile - OI configuration using INI files

SYNOPSIS

 my $ini = OpenInteract2::Config->new( 'ini', { filename => 'foo.ini' } );
 print "Value of foo.bar: $ini->{foo}{bar}\n";

DESCRIPTION

Subclass of OpenInteract2::Config that translates files/content to/from INI format.

Finding a Reader Class

The INI reader used by this class is configurable. If the context has been initialized we use the INI reader specified in the server configuration key 'system_class.ini_reader'. If it has not yet been initialized we use the default reader (OpenInteract2::Config::Ini).

Generally this means that the default reader will be used to read in the server configuration -- since it is in INI format! -- and your custom reader will be used for everything else (SPOPS, action, repository, observer, global overrides, etc.).

METHODS

valid_keys()

Returns the valid keys in this configuration.

read_config()

Reads a configuration from a file or content passed in; uses the reader class as specified above.

write_config( [ $filename ] )

Writes the existing configuration to a file. If $filename not specified will use the file used to originally open the configuration.

ini_factory()

Returns a new instance of the reader class which is found as specified above.

SEE ALSO

OpenInteract2::Config::Ini

OpenInteract2::Config

COPYRIGHT

Copyright (c) 2002-2005 Chris Winters. All rights reserved.

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

AUTHORS

Chris Winters <chris@cwinters.com>