CGI::Application::Plugin::Config::Perl

Pure Perl config file management for CGI::Application
Download

CGI::Application::Plugin::Config::Perl Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Mark Stosberg
  • Publisher web site:
  • http://search.cpan.org/~mgraham/

CGI::Application::Plugin::Config::Perl Tags


CGI::Application::Plugin::Config::Perl Description

Pure Perl config file management for CGI::Application CGI::Application::Plugin::Config::Perl is a Perl module that adds easy access to a pure Perl config file to your CGI::Application projects. Lazy loading is used to prevent the config file from being parsed if no configuration variables are accessed during the request, so the config file is not parsed until it is actually needed.I have been using pure Perl config files for almost a decade and find they work very well. I originally wrote CGI::Application::Plugin::ConfigAuto to support all kinds of config files, but found that I only ever used Perl-based config files. This module has the same interface as the ConfigAuto plugin, without the option for other formats, and the extra dependency and resource use that comes with that flexibility.SYNOPSIS use CGI::Application::Plugin::Config::Perl 'cfg';In your instance script: my $app = WebApp->new(PARAMS => { cfg_file => 'config.pl' }); $app->run();In your application module: sub my_run_mode { my $self = shift; # Access a config hash key directly $self->cfg('field'); # Return config as hash G = $self->cfg; } Requirements: · Perl


CGI::Application::Plugin::Config::Perl Related Software