NAME

Apache2::ASP::Config - Configuration object for Apache2::ASP web applications.

READ THIS FIRST

NOTE: This module requires the environment variable $ENV{APACHE2_ASP_APPLICATION_ROOT} to be set to the path where your Apache2::ASP application lives.

For instance, say you keep your website at /var/www - you would set $ENV{APACHE2_ASP_APPLICATION_ROOT} to /var/www.

If you keep your *.asp pages inside /var/www/htdocs - you would still set $ENV{APACHE2_ASP_APPLICATION_ROOT} to /var/www.

If you keep your *.asp pages inside /usr/local/mywebsite/htdocs - you would set $ENV{APACHE2_ASP_APPLICATION_ROOT} to /usr/local/mywebsite.

If $ENV{APACHE2_ASP_APPLICATION_ROOT} is not set, Apache2::ASP::Config will do its best to guess it for you. Usually it's pretty good at it, and you will never know the difference. However, if this module keeps failing and can't find your config file, it's most likely because $ENV{APACHE2_ASP_APPLICATION_ROOT} was not properly set.

SYNOPSIS

use Apache2::ASP::Config;
my $config = Apache2::ASP::Config->new();

print $config->www_root;                        # /var/www/html

print $config->application_name;                # DefaultApp

print $config->handler_root;                    # /var/www/html/handlers

print $config->page_cache_root;                 # /var/www/html/PAGE_CACHE

print $config->media_manager_upload_root;       # /var/www/html/MEDIA

print $config->application_state->manager;      # Apache2::ASP::ApplicationStateManager::SQLite

print $config->application_state->dsn;          # DBI:SQLite:dbname=/tmp/apache2_asp_state

print $config->application_state->username;     # "username"

print $config->application_state->password;     # "password"

print $config->session_state->manager;          # Apache2::ASP::SessionStateManager::SQLite

print $config->session_state->cookie_domain;    # .yoursite.com

print $config->session_state->cookie_name;      # session-id

print $config->session_state->dsn;              # DBI:SQLite:dbname=/tmp/apache2_asp_state

print $config->session_state->username;         # "username"

print $config->session_state->password;         # "password"

print $config->session_state->session_timeout;  # 30 (means 30 minutes)

my @filters = $config->request_filters;         # A list of your Apache2::ASP::RequestFilter classes

print $config->settings->lib;                   # /usr/local

print $config->settings->dsn;                   # DBI:mysql:dbname:hostname

print $config->settings->username;              # "username"

print $config->settings->password;              # "password"

DESCRIPTION

Each web application gets its own configuration. For more information about the config xml format, see Apache2::ASP::GlobalConfig.

For information on setting up the configuration, please refer to Apache2::ASP::Manual::Intro and Apache2::ASP::Manual::ConfigXML.

PUBLIC METHODS

new( )

Returns a new Apache2::ASP::Config object.

validate_config( )

Used for testing, but it could (possibly) be useful some other way. Validates the config. Dies if the config contains errors.

PUBLIC PROPERTIES

$config->www_root

Returns

$config->application_name

See synopsis.

$config->handler_root

See synopsis.

$config->page_cache_root

See synopsis.

$config->media_manager_upload_root

See synopsis.

$config->application_state->manager

See synopsis.

$config->application_state->dsn

See synopsis.

$config->application_state->username

See synopsis.

$config->application_state->password

See synopsis.

$config->session_state->manager

See synopsis.

$config->session_state->cookie_domain

See synopsis.

$config->session_state->cookie_name

See synopsis.

$config->session_state->dsn

See synopsis.

$config->session_state->username

See synopsis.

$config->session_state->password

See synopsis.

$config->request_filters

See synopsis and Apache2::ASP::RequestFilter

$config->settings->lib

The path to your Application-specific Perl modules, not your Handlers.

Generally these are Class::DBI or DBIx::Class modules (or whatever you prefer to use).

$config->settings->dsn

The connectionstring your application uses.

$config->settings->username

The username for your application's connectionstring.

$config->settings->password

The password for your application's connectionstring.

BUGS

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.

HOMEPAGE

Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.

AUTHOR

John Drago mailto:jdrago_999@yahoo.com

COPYRIGHT AND LICENSE

Copyright 2007 John Drago, All rights reserved.

This software is free software. It may be used and distributed under the same terms as Perl itself.