Apache2::ASP::Config - Configuration object for Apache2::ASP web applications.
NOTE: This module requires the environment variable $ENV{APACHE2_ASP_APPLICATION_ROOT} to be set to the path where your Apache2::ASP application lives.
$ENV{APACHE2_ASP_APPLICATION_ROOT}
For instance, say you keep your website at /var/www - you would set $ENV{APACHE2_ASP_APPLICATION_ROOT} to /var/www.
/var/www
If you keep your *.asp pages inside /var/www/htdocs - you would still set $ENV{APACHE2_ASP_APPLICATION_ROOT} to /var/www.
/var/www/htdocs
If you keep your *.asp pages inside /usr/local/mywebsite/htdocs - you would set $ENV{APACHE2_ASP_APPLICATION_ROOT} to /usr/local/mywebsite.
/usr/local/mywebsite/htdocs
/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.
Apache2::ASP::Config
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"
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.
Returns a new Apache2::ASP::Config object.
Used for testing, but it could (possibly) be useful some other way. Validates the config. Dies if the config contains errors.
Returns
See synopsis.
See synopsis and Apache2::ASP::RequestFilter
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).
The connectionstring your application uses.
The username for your application's connectionstring.
The password for your application's connectionstring.
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.
Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Apache2::ASP in action.
John Drago mailto:jdrago_999@yahoo.com
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.
To install Apache2::ASP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::ASP
CPAN shell
perl -MCPAN -e shell install Apache2::ASP
For more information on module installation, please visit the detailed CPAN module installation guide.