Apache2::ASP::GlobalASA - Base GlobalASA class
In your apache2-asp-config.xml:
apache2-asp-config.xml
<?xml version="1.0" ?> <config> ... <web> ... <application_name>MyApp</application_name> ... </web> ... </config>
Then, in htdocs/GlobalASA.pm:
htdocs/GlobalASA.pm
package MyApp::GlobalASA; use strict; use warnings; use base 'Apache2::ASP::GlobalASA'; use vars __PACKAGE__->VARS; # Called when the apache httpd process first initializes, # before Application_OnStart is called sub Server_OnStart { warn "Server_OnStart()"; }# end Server_OnStart() # Called the first time an application is actually fired up: sub Application_OnStart { warn "Application_OnStart()"; }# end Application_OnStart() # Called on the first request received from a client: sub Session_OnStart { warn "Session_OnStart()"; }# end Session_OnStart() # Called *after* RequestFilters, but before the ASP script (or handler) sub Script_OnStart { warn "Script_OnStart()"; }# end Session_OnStart() # Called after the ASP script or handler, but before any PerlCleanupHandlers sub Script_OnEnd { warn "Script_OnEnd()"; }# end Script_OnEnd() 1;# return true:
In "Classic ASP" the Global.ASA provided a means of hooking into the Application_OnStart and Session_OnStart events.
Application_OnStart
Session_OnStart
In Apache2::ASP more events are provided, taking the same idea a little further.
Apache2::ASP
Called once per Apache httpd process, before Application_OnStart.
Called once in the lifetime of an Application.
Called once at the beginning of a browser session.
This is a good place to initialize any session variables.
Called after any/all Apache2::ASP::RequestFilters have finished.
This event won't get used much anymore, since we have Apache2::ASP::RequestFilters now, but we keep it around just in case you want it for something quick.
Called after the script has ended, before any PerlCleanupHandlers are called.
PerlCleanupHandler
NOTE: This event is not raised if an error is thrown while executing the request.
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 <jdrago_999@yahoo.com>
Copyright 2008 John Drago. All rights reserved.
This software is Free software and is licensed 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.