Apache2::Controller::Funk
Version 1.000.111
$bool = controller_allows_method($class, $method); check_allowed_method($class, $method); # throws NOT_FOUND exception
Useful routines for both Apache2::Controller and Apache2::Controller::Dispatch objects to run. Results and whether to 'require' are cached in this package's namespace across requests, optimizing efficiency per mod_perl2 child, and are queried futher using 'exists', which is very fast.
$bool = controller_allows_method($class, $method); # controller_allows_method()
Ask if method name is returned by allowed_methods() in the given controller package.
allowed_methods()
Only two 'exists' calls are required for each query after caching the first result for this child.
check_allowed_method($method, $class); # check_allowed_method()
Throw a NOT_FOUND exception if the method is not an allowed method in the allowed_methods() list in the controller package.
log_bad_request_reason( $r, $X );
Call $r->log_reason( $msg, $r->uri() ) where $msg is a truncated version of $X in case $X is too long.
To install Apache2::Controller, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::Controller
CPAN shell
perl -MCPAN -e shell install Apache2::Controller
For more information on module installation, please visit the detailed CPAN module installation guide.