|
NAMEPOE::Component::Server::HTTPServer::Handler - request handler interface SYNOPSIS package MyHandler;
use base 'POE::Component::Server::HTTPServer::Handler';
# import H_CONT and H_FINAL:
use POE::Component::Server::HTTPServer::Handler;
sub _init {
my $self = shift;
my @args = @_;
# ...
}
sub handle {
my $self = shift;
my $context = shift;
if ( $context->{use_myhandler} ) {
$context->{response}->code(200);
$context->{response}->content("Boo!");
return H_FINAL;
} else {
return H_CONT;
}
}
1;
DESCRIPTIONThis package defines the standard interface for request handlers. You can subclass this package to define custom behavior. METHODS
SEE ALSOPOE::Component::Server::HTTPServer, POE::Component::Server::HTTPServer::NotFoundHandler, POE::Component::Server::HTTPServer::BasicAuthenHandler, POE::Component::Server::HTTPServer::ParameterParseHandler, POE::Component::Server::HTTPServer::StaticHandler AUTHORGreg Fast <gdf@speakeasy.net> COPYRIGHTCopyright 2003 Greg Fast. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|