Config::IniSearch - Wrapper class for Config::IniHash to search for INI files
use Config::IniSearch; $config = new Config::IniSearch( 'inisection' ); $val = $config->{param_name}; use Config::IniSearch; $config = new Config::IniSearch( 'inisection', ['/usr/local/share/myfile.ini'] ); $val = $config->{param_name};
This module is intended to relieve the developer from having to keep track of the location and name of individual INI files. An INI file will be recognized by one of two names:
Either/both of these must contain the section [inisection].
The following methods are available:
The constructor requires one argument, a section name, $INISectionName. Optional arguments include a fully-qualified INI filename ($INIFileName) and options for Config::IniHash (see perldoc Config::IniHash). NOTE: By default, case is preserved.
$INIFileName must be set if passing in options for Config::IniHash. The section name does not need to be specified when accessing elements in $INISectionName:
$val = $config->{param_name};
When the constructor is invoked, the following list of defaults is searched for the appropriate INI file:
Notice that the first INI file found will be the one used for subsequent lookups.
Returns the name of the INI file currently accessed by the object.
Returns the name of the INI section name currently accessed by $config.
None by default.
Brian Koontz <brian@pongonova.net>
Copyright (c) 2003 Brian Koontz <brian@pongonova.net>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Config::IniSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::IniSearch
CPAN shell
perl -MCPAN -e shell install Config::IniSearch
For more information on module installation, please visit the detailed CPAN module installation guide.