[cgiapp] Combining CGI::App::Plugin::Apache and CGI::App::Dispatch

Ron Savage ron at savage.net.au
Sun Jan 27 17:57:08 EST 2008


On Mon, 2008-01-21 at 09:33 -0500, Michael Peters wrote:

Hi Michael
> You can subclass Dispatch. That's not a problem. I do it all the time. But you

Yes, thanx. I eventually understood what to do...

<===><8===>
package CGI::Application::Test::ModperlDispatcher;

use base 'CGI::Application::Dispatch';
use strict;
use warnings;

our $VERSION = '1.00';

# -----------------------------------------------

sub dispatch_args
{
	return
	{
		prefix => 'CGI::Application::Test::Modperl',
		table  =>
		[
		 ''         => {app => 'main-menu', rm => 'menu'},
		 ':app/:rm' => {},
		],
	};

} # End of dispatch_args.

# -----------------------------------------------

1;
<===><8===>
I.e. Exactly as recommended. The problem was in the understanding, not
in your code. And in httpd.conf:
<===><8===>
<Location /mp>
	SetHandler perl-script
	PerlResponseHandler CGI::Application::Test::ModperlDispatcher
</Location>
<===><8===>
Again, exactly as recommended...

-- 
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html




More information about the cgiapp mailing list