Artur Penttinen
and 1 contributors

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 Config::IniFiles to be easily used inside CGI::Application module.

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

METHODS

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.

config()

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

config()

Same as config() for more convenient.

SEE ALSO

See CGI::Application, Config::IniFiles.

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.