SetHandler perl-script
PerlHandler Sample::Dispatch
####
package Sample::Dispatch;
use strict;
use warnings;
use CGI::Application::Dispatch;
use base qw(CGI::Application::Dispatch);
sub dispatch_args {
return {
prefix => 'Sample',
table => [ q{} => { app => 'Application', rm => 'index' }, ],
};
}
1;
####
package Sample::Application;
use strict;
use warnings;
use base qw(CGI::Application);
use CGI::Application::Plugin::Apache qw(:all);
sub setup {
my ( $self, $args ) = @_;
$self->run_modes('index' => 'index');
$self->start_mode('index');
return 1;
}
sub index {
my ( $self, $args ) = @_;
$self->header_type('none');
$self->query->status(403);
return q{};
}
1;