CGI::Application::Plugin::Config::IniFiles - Add Config::IniFiles support to CGI::Application.
use CGI::Application::Plugin::Config::IniFiles; sub cgiapp_init { my($self) = @_; $self->config_file("app.conf"); my $opt = $self->config->val("main","option"); ... } sub run_mode { my($self) = @_; my $opt = $self->config->val("main","option"); ... }
This module works as plugin for Config::IniFiles to be easily used inside CGI::Application module.
Module provides tree calls: config_file(), config() and cfg().
config_file()
config()
cfg()
config_file($file[,%options])
This method reads file $file and create Config::IniFiles object. Optional arguments has same semantics as in "new" in Config::IniFiles. You can also pass a Config::IniFiles object instead of a filename which is useful for persistent environments like FastCGI.
Returns underlying Config::IniFiles object for direct access to its methods.
Same as config() for more convenient.
See CGI::Application, Config::IniFiles.
Artur Penttinen, <artur+perl@niif.spb.su>, Sven Neuhaus <sven-bitcard@sven.de>
Copyright (C) 2007 by Artur Penttinen
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install CGI::Application::Plugin::Config::IniFiles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Application::Plugin::Config::IniFiles
CPAN shell
perl -MCPAN -e shell install CGI::Application::Plugin::Config::IniFiles
For more information on module installation, please visit the detailed CPAN module installation guide.