# Apache::Request subclass use strict; use Log::Log4perl; package My::Apache::Request; use Apache::Request; sub new { my ( $class, @args ) = @_; return bless { r=>Apache::Request->new(@args) }, $class; } sub LOGGER { my $self = shift; my $log = shift || 'WebApp'; return Log::Log4perl->get_logger( $log ); } 1; #### # Handler use strict; package My::Apache::Handler; use base qw( My::Apache::Request ); use Apache::Constants qw( :common :response ); sub handler { my $r = shift; $r->LOGGER->debug('Whatever'); $r->send_http_header(); print "The Handler.\n"; return OK; } 1;