CGI::Application::Plugin::Config::IniFiles - Add Config::IniFiles support to CGI::Application.


NAME

CGI::Application::Plugin::Config::IniFiles - Add Config::IniFiles support to CGI::Application.


SYNOPSIS

  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");
    ...
  }


DESCRIPTION

This module works as plugin for the Config::IniFiles manpage to be easily used inside the CGI::Application manpage module.

Module provides tree calls: config_file(), config() and cfg().


METHODS

config_file($file[,%options])

This method reads file $file and create the Config::IniFiles manpage object. Optional arguments has same semantics as in new in the Config::IniFiles manpage. You can also pass a the Config::IniFiles manpage object instead of a filename which is useful for persistent environments like FastCGI.

config()

Returns underlying the Config::IniFiles manpage object for direct access to its methods.

config()

Same as config() for more convenient.


SEE ALSO

See the CGI::Application manpage, the Config::IniFiles manpage.


AUTHOR

Artur Penttinen, <artur+perl@niif.spb.su>, Sven Neuhaus <sven-bitcard@sven.de>


COPYRIGHT AND LICENSE

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.