=pod =head1 NAME Apache2::ASP::Manual::ASP_Compilation - Documentation about ASP Compilation =head1 DESCRIPTION When Apache2::ASP receives a request for an ASP script, it goes through the following steps: =over 4 =item 1 Does the ASP script exist? =item 2 Was it already compiled? =item 3 Is the ASP script newer? =item 4 Recompile the ASP script if necessary. =item 5 Load up the *.pm file. =item 6 Execute the *.pm file. =back ASP Scripts are "compiled" into Perl modules that look like the following: #============================================================================== # THIS FILE WAS AUTOMATICALLY GENERATED BY Apache2::ASP::PageHandler. # TIMESTAMP: Thu Jun 28 23:18:17 2007 # CHANGES TO THIS FILE WILL BE OVERWRITTEN WHEN THE ASP SCRIPT IS CHANGED #============================================================================== package DefaultApp::index_asp; use strict; use warnings 'all'; no warnings 'redefine'; use base 'Apache2::ASP::PageHandler'; use vars qw( $Session $Server $Request $Response $Form $Application $Config ); our $TIMESTAMP = 1183094297; #line 1 sub process_request { $Response->Write(q~~); $Response->Write("Hello, World!"); return; ;$Response->Write(q~ ~); } 1;# return true: =pod =head2 process_request( ) =cut Yes, you guessed it. This one prints "Hello, World!" to the browser. =head1 FILE NAMES If your ASP script is C then your *.pm file will be C. If your ASP script is C then your *.pm file will be C. And so on. =head1 WHAT IS THE POINT? ASP scripts are compiled to Perl modules and stored on disk for 2 reasons: =head2 Performance Even though the ASP parser is quite fast (L) it is still extra work that can be avoided. By storing the resulting output on disk we can reduce some overhead and get a slight performance boost. =head2 Testing Yes - you can test your ASP scripts using L just like any other Perl module. You can learn more about this by reading up on L. Please read the Testing Intro at L to see how testing works. =head1 BUGS It's possible that some bugs have found their way into this release. Use RT L to submit bug reports. =head1 HOMEPAGE Please visit the Apache2::ASP homepage at L to see examples of Apache2::ASP in action. =head1 AUTHOR John Drago L =head1 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. =cut