[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] [ANNOUNCE] CGI::Application::Dispatch 1.00


The uploaded file

    CGI-Application-Dispatch-1.00.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/W/WO/WONKO/CGI-Application-Dispatch-1.00.tar.gz
  size: 8069 bytes
   md5: 4a50af9b0f8420b65a36b8d3255a8279

Changes in this release include:

    - fixed bug which prevented overriding of certain methods
    - upped required perl version to 5.8.0 because of method attributes

NAME
    CGI::Application::Dispatch - Class used to dispatch request to
	CGI::Application based objects

SYNOPSIS
  Under 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();

DESCRIPTION
    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.

    In addition, the portion of the "PATH_INFO" that is used to derive
    the module name is also passed to the "PARAMS" of the modules
    "<new()"> as CGIAPP_DISPATCH_PATH. This can be useful if you are
    programatically generating URLs.

    It will translate a URI like this (under mod_perl):

            /app/module_name/run_mode

    or this (vanilla cgi)

            /app/index.cgi/module_name/run_mode

    into something that will be functionally similar to this

            my $app = Module::Name->new(..);
            $app->mode_param(sub {'run_mode'}); #this will set the rm

    And in both cases the CGIAPP_DISPATCH_PATH value will be
    'module_name' so that you can generate a self referential URL by
    doing something like the following inside of your application
    module:

        my $url = 'http://mysite.com/app/' .
        $self->param('CGIAPP_DISPATCH_PATH');

--
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.