Apache2::Controller::Methods - methods shared by Apache2::Controller modules


Apache2-Controller documentation  | view source Contained in the Apache2-Controller distribution.

Index


NAME

Top

Apache2::Controller::Methods - methods shared by Apache2::Controller modules

VERSION

Top

Version 1.000.111

SYNOPSIS

Top

 package Apache2::Controller::SomeNewBrilliantPlugin;

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

 # ...
 my $directives = $self->get_directives();
 my $directive  = $self->get_directive('A2CSomethingSomething');

DESCRIPTION

Top

Methods shared in common by various Apache2::Controller modules, like Apache2::Controller, Apache2::Controller::Dispatch, etc.

Note: In this module we always dereference $self-{r}>, because we don't know if $self is blessed as an Apache2::Request yet or not. (This package is used as a base by multiple handler stages.)

METHODS

Top

get_directives

 my $directives_hashref = $self->get_directives();

Returns the Apache2::Controller::Directives config hash for this request, with per-directory settings.

NOTE: real directives don't work because of problems with Apache::Test. For now use PerlSetVar.

When directives work, if you mix A2C Directives with PerlSetVar statements in Apache config, the directives take precedence and the PerlSetVar values are not merged. Hrmm. Well, I think there's a method, but I've got better things to work on right now.

get_directive

 my $value = $self->get_directive( $A2CDirectiveNameString )

Returns the value of the given directive name. Does not die if get_directives() returns an empty hash.

NOTE: directives don't work because of problems with Apache::Test. For now use PerlSetVar.

SEE ALSO

Top

Apache2::Controller

Apache2::Controller::Session

Apache2::Request

Apache2::Module

Apache2::Directives

Apache2::Cookie

AUTHOR

Top

Mark Hedges, hedges +(a t)- formdata.biz

COPYRIGHT AND LICENSE

Top


Apache2-Controller documentation  | view source Contained in the Apache2-Controller distribution.