Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

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

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;                        # /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"


DESCRIPTION

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.


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->settings->lib

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

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

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy