The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache2::ASP::Config - Central configuration for Apache2::ASP

SYNOPSIS

  # Settings:
  $Config->system->settings->some_setting;
  $Config->system->settings->another_setting;
  
  # Error-handling:
  $Config->errors->error_handler;
  $Config->errors->mail_errors_to;
  $Config->errors->mail_errors_from;
  $Config->errors->smtp_server;
  
  # Web:
  $Config->web->application_name;
  $Config->web->application_root;
  $Config->web->www_root;
  $Config->web->handler_root;
  $Config->web->media_manager_upload_root;
  $Config->web->page_cache_root;
  
  # Data Connections:
  foreach my $conn ( map { $Config->data_connections->$_ } qw/ session application main / )
  {
    my $dbh = DBI->connect(
      $conn->dsn,
      $conn->username,
      $conn->password
    );
  }# end foreach()

XML Config File

Apache2::ASP keeps all of its configuration inside of /conf/apache2-asp-conf.xml

Here is an example:

  <?xml version="1.0" ?>
  <configuration>

    <system>
      <post_processors>
  <!--
        <class>My::PostProcessor</class>
        <class>My::PostProcessor2</class>
  -->
      </post_processors>
      <libs>
        <lib>@ServerRoot@/lib</lib>
      </libs>
      
      <load_modules>
        <module>DBI</module>
      </load_modules>
      
      <env_vars>
        <var>
          <name>myvar</name>
          <value>value</value>
        </var>
        <var>
          <name>myvar2</name>
          <value>value2</value>
        </var>
      </env_vars>
      
      <settings>
        <setting>
          <name>mysetting</name>
          <value>value</value>
        </setting>
        <setting>
          <name>mysetting2</name>
          <value>value2</value>
        </setting>
      </settings>
    </system>
    
    <errors>
      <error_handler>My::ErrorHandler</error_handler>
      <mail_errors_to>jdrago_999@yahoo.com</mail_errors_to>
      
      <mail_errors_from>root@localhost</mail_errors_from>
      <smtp_server>localhost</smtp_server>
    </errors>
    
    <web>
      <application_name>DefaultApp</application_name>
      <application_root>@ServerRoot@</application_root>
      <handler_root>@ServerRoot@/handlers</handler_root>
      <media_manager_upload_root>@ServerRoot@/MEDIA</media_manager_upload_root>
      <www_root>@ServerRoot@/htdocs</www_root>
      <page_cache_root>@ServerRoot@/PAGE_CACHE</page_cache_root>
      <request_filters>
  <!--
        <filter>
          <uri_match>/.*</uri_match>
          <class>My::MemberFilter</class>
        </filter>
        <filter>
          <uri_equals>/index.asp</uri_equals>
          <class>My::MemberFilter2</class>
        </filter>
  -->
      </request_filters>
      
    </web>
    
    <data_connections>
      <session>
        <manager>Apache2::ASP::SessionStateManager::SQLite</manager>
        <cookie_name>session-id</cookie_name>
        <dsn>DBI:SQLite:dbname=/tmp/apache2_asp_applications</dsn>
        <username></username>
        <password></password>
        <session_timeout>30</session_timeout>
      </session>
      <application>
        <manager>Apache2::ASP::ApplicationStateManager::SQLite</manager>
        <dsn>DBI:SQLite:dbname=/tmp/apache2_asp_applications</dsn>
        <username></username>
        <password></password>
      </application>
      <main>
        <dsn>DBI:SQLite:dbname=/tmp/apache2_asp_applications</dsn>
        <username></username>
        <password></password>
      </main>
      
    </data_connections>
    
  </configuration>

DESCRIPTION

PUBLIC PROPERTIES

PUBLIC METHODS

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 <jdrago_999@yahoo.com>

COPYRIGHT

Copyright 2008 John Drago. All rights reserved.

LICENSE

This software is Free software and is licensed under the same terms as perl itself.