Apache2::Controller::NonResponseRequest - internal base class w/ apreq for


Apache2-Controller documentation Contained in the Apache2-Controller distribution.

Index


Code Index:

NAME

Top

Apache2::Controller::NonResponseRequest - internal base class w/ apreq for non-response handlers in Apache2::Controller framework

VERSION

Top

Version 1.000.111

SYNOPSIS

Top

This is an INTERNAL base class and you don't need to use it.

 package Apache2::Controller;
 use base Apache2::Controller::NonResponseRequest;

 # no need to define handler() or new()

 1;

DESCRIPTION

Top

This is like Apache2::Controller::NonResponseBase except that it creates the Apache2::Request object and makes $self an inheriting subclass of it. So using this as a base, there is no need to dereference $self->{r} to get at the request. It is all $self just like within Apache2::Controller controller modules.

You should not use this module for anything that you're doing.

METHODS

Top

new

new() creates an object of the child class using Apache2::Controller::NonResponseBase and then assigns the Apache2::Request object to $self->{r}.

SEE ALSO

Top

Apache2::Controller::NonResponseBase

Apache2::Request

Apache2::RequestRec

Apache2::Controller::Auth::OpenID (uses this as base)

Apache2::Controller

AUTHOR

Top

Mark Hedges, <hedges at formdata.biz>

COPYRIGHT & LICENSE

Top


Apache2-Controller documentation Contained in the Apache2-Controller distribution.
package Apache2::Controller::NonResponseRequest;

use version;
our $VERSION = version->new('1.000.111');

use strict;
use warnings FATAL => 'all';
use English '-no_match_vars';

use base qw( 
    Apache2::Controller::NonResponseBase
    Apache2::Controller::Methods
    Apache2::Request
);

use Log::Log4perl qw(:easy);
use YAML::Syck;

use Apache2::RequestRec ();
use Apache2::RequestUtil ();
use Apache2::Log;
use Apache2::URI;
use Apache2::Const -compile => qw( :common :http :methods );

use Apache2::Controller::X;
use Apache2::Controller::Const qw( @RANDCHARS $NOT_GOOD_CHARS );
use Apache2::Controller::Funk qw( log_bad_request_reason );

sub new {
    my ($class, $r) = @_;

    # note the '::' in call to new, not '->' ... we have to trick the class
    my $self = Apache2::Controller::NonResponseBase::new($class, $r);

    $class = $self->{class};

    DEBUG("Created NonResponseBase of class '$class'");

    $self->{r} = Apache2::Request->new( $self->{r},);

    DEBUG("Replaced self->{r} with Apache2::Request object");

    return $self;
}

1;