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

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


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
suppressed
http://savage.net.au/index.html



#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################


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