NAME

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

VERSION

Version 0.110.000 - BETA TESTING (ALPHA?)

SYNOPSIS

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

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

# etc.

Apache2::Controller::Dispatch

See Apache2::Controller::Dispatch

A2C_Dispatch_Map

This is the path to a file compatible with YAML::Syck. If you do not provide a dispatch_map() subroutine, the hash will be loaded with this file.

Different subclasses of Apache2::Controller::Dispatch have different data structures. YMMV.

Or, if you just specify a package name, it will generate a dispatch map with one 'default' entry with that package.

Apache2::Controller::Render::Template

See Apache2::Controller::Render::Template.

A2C_Render_Template_Path

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.)

A2C_Render_Template_Opts

<location "/where/template/is/used">
    A2C_Render_Template_Opts INTERPOLATE 1
    A2C_Render_Template_Opts PRE_PROCESS header meta style scripts
    A2C_Render_Template_Opts 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!

Apache2::Controller::Session

See Apache2::Controller::Session.

A2C_Session_Class

A2C_Session_Class Apache::Session::File

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

A2C_Session_Opts

Multiple arguments

A2C_Session_Opts   Directory       /tmp/sessions
A2C_Session_Opts   LockDirectory   /var/lock/sessions
A2C_Session_Cookie_Opts name    myapp_sessionid
A2C_Session_Cookie_Opts expires +3M

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

Apache2::Controller::DBI::Connector

See Apache2::Controller::DBI::Connector.

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

A2C_DBI_Cleanup

Boolean.

A2C_DBI_Cleanup        1

A2C_DBI_Pnotes_Name

String value.

A2C_DBI_Pnotes_Name    reader

A2C_DBI_Class

If you subclass DBI, specify the name of your DBI subclass here.

A2C_DBI_Class      MyApp::DBI

Note that this is connected with a string eval which is slow. If you don't use it, it uses a block eval to connect DBI.

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.