CGI::Application::Dispatch

CGI::Application::Dispatch is a Perl module to dispatch requests to CGI::Application based objects.
Download

CGI::Application::Dispatch Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michael Peters
  • Publisher web site:
  • http://search.cpan.org/~wonko/CGI-Application-Dispatch-2.12/lib/CGI/Application/Dispatch.pm

CGI::Application::Dispatch Tags


CGI::Application::Dispatch Description

CGI::Application::Dispatch is a Perl module to dispatch requests to CGI::Application based objects. CGI::Application::Dispatch is a Perl module to dispatch requests to CGI::Application based objects.SYNOPSISOut of BoxUnder mod_perl < Location /app > SetHandler perl-script PerlHandler CGI::Application::Dispatch < /Location >Under normal cgi #!/usr/bin/perl use strict; use CGI::Application::Dispatch; CGI::Application::Dispatch->dispatch();With a dispatch table package MyApp::Dispatch; use base 'CGI::Application::Dispatch'; sub dispatch_args { return { prefix => 'MyApp', table => , }; }Under mod_perl < Location /app > SetHandler perl-script PerlHandler MyApp::Dispatch < /Location >Under normal cgi #!/usr/bin/perl use strict; use MyApp::Dispatch; MyApp::Dispatch->dispatch();This module provides a way (as a mod_perl handler or running under vanilla CGI) to look at the path ($r->path_info or $ENV{PATH_INFO}) of the incoming request, parse off the desired module and it's run mode, create an instance of that module and run it.It currently supports both generations of mod_perl (1.x and 2.x). Although, for simplicity, all examples involving Apache configuration and mod_perl code will be shown using mod_perl 1.x. This may change as mp2 usage increases.It will translate a URI like this (under mod_perl): /app/module_name/run_modeor this (vanilla cgi) /app/index.cgi/module_name/run_modeinto something that will be functionally similar to this my $app = Module::Name->new(..); $app->mode_param(sub {'run_mode'}); #this will set the run mode Requirements: · Perl


CGI::Application::Dispatch Related Software