The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Apache2::Controller::Directives - server config directives for A2C

VERSION

Version 0.101.111 - BETA TESTING (ALPHA?)

SYNOPSIS

 # apache2 config file
 PerlLoadModule Apache2::Controller::Directives

 # for Apache2::Controller::Render::Template settings:
 A2CRenderTemplatePath /var/myapp/templates

 # etc.

DIRECTIVES

A2CRenderTemplatePath

This is the base path for templates used by Apache2::Controller::Render::Template. The directive takes only one parameter and verifies that the directory exists and is readable.

(At startup time Apache2 is root... this should verify readability by www user? Hrmm how is it going to figure out what user that is? It will have to access the server config via $parms. Except that this does not appear to work? It returns an empty hash.)

A2CRenderTemplateOpts

 <location "/where/template/is/used">
     A2CRenderTemplateOpts INTERPOLATE 1
     A2CRenderTemplateOpts PRE_PROCESS header meta style scripts
     A2CRenderTemplateOpts POST_CHOMP  1
 </location>

Options for Template Toolkit. See Template.

You can also implement <get_template_opts> in your controller subclass, which simply returns the hash reference of template options. See Apache2::Controller::Render::Template.

Note the behavior is to merge values specified at multiple levels into array references. i.e. a subdirectory could specify an additional <PRE_PROCESS> template or whatever. YMMV. It should be this way, at any rate!

A2CSessionClass

 A2CSessionClass Apache::Session::File

Single argument, the class for the tied session hash. Apache::Session.

A2CSessionOptions

Multiple arguments

 A2CSessionOptions   Directory       /tmp/sessions
 A2CSessionOptions   LockDirectory   /var/lock/sessions

A2CSessionCookieOptions

 A2CSessionCookieOptions name    myapp_sessionid
 A2CSessionCookieOptions expires +3M

Multiple arguments. Apache2::Controller::Session::Cookie, Apache2::Cookie

A2C_DBI_DSN

 A2C_DBI_DSN        DBI:mysql:database=foobar;host=localhost

Single argument, the DSN string. DBI

A2C_DBI_User

 A2C_DBI_User       heebee

Single argument, the DBI username.

A2C_DBI_Password

 A2C_DBI_Password   jeebee

Single argument, the DBI password.

A2C_DBI_Options

Multiple arguments

 A2C_DBI_Options    RaiseError  1
 A2C_DBI_Options    AutoCommit  0

SEE ALSO

Apache2::Controller

"get_directive" in Apache2::Controller::Methods

Apache2::Controller::Session

Apache2::Module

AUTHOR

Mark Hedges, hedges +(a t)- scriptdolphin.org

COPYRIGHT AND LICENSE

Copyright 2008 Mark Hedges. CPAN: markle

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.