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



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.

Clear? Good.


SYNOPSIS

  use Apache2::ASP::Config;
  my $config = Apache2::ASP::Config->new();
  
  print $config->www_root;                        # /usr/local/dstack/htdocs
  
  print $config->application_name;                # DefaultApp
  
  print $config->handler_root;                    # /usr/local/dstack/handlers
  
  print $config->page_cache_root;                 # /usr/local/dstack/PAGE_CACHE
  
  print $config->media_manager_upload_root;       # /usr/local/dstack/MEDIA
  
  print $config->application_state->manager;      # Apache2::ASP::ApplicationStateManager::SQLite
  
  print $config->application_state->dsn;          # DBI:SQLite:dbname=/tmp/apache2_asp_state
  
  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->session_timeout;  # 30 (means 30 minutes)


DESCRIPTION

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


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.


BUGS

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.


HOMEPAGE

Please visit the Apache2::ASP homepage at http://apache2-asp.no-ip.org/ 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.

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