| Apache2::ASP::Config - Configuration object for Apache2::ASP web applications. |
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.
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.
Clear? Good.
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) 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 the Apache2::ASP::GlobalConfig manpage.
For information on setting up the configuration, please refer to the Apache2::ASP::Manual::Intro manpage and the Apache2::ASP::Manual::ConfigXML manpage.
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.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
See synopsis.
The path to your Application-specific Perl modules, not your Handlers.
Generally these are the Class::DBI manpage or the DBIx::Class manpage 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.
Returns a list of the Apache2::ASP::Config::Node manpage objects, each representing a different <filter> node from your config file.
See the Apache2::ASP::RequestFilter manpage for more information.
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html 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.
| Apache2::ASP::Config - Configuration object for Apache2::ASP web applications. |