| Apache2-Controller documentation | view source | Contained in the Apache2-Controller distribution. |
Apache2::Controller::Methods - methods shared by Apache2::Controller modules
Version 1.000.111
package Apache2::Controller::SomeNewBrilliantPlugin;
use base qw( Apache2::Controller::Methods );
# ...
my $directives = $self->get_directives();
my $directive = $self->get_directive('A2CSomethingSomething');
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.)
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.
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.
Apache2::Directives
Mark Hedges, hedges +(a t)- formdata.biz
Copyright 2008-2010 Mark Hedges. CPAN: markle
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This software is provided as-is, with no warranty and no guarantee of fitness for any particular purpose.
| Apache2-Controller documentation | view source | Contained in the Apache2-Controller distribution. |