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::Manual::ASP_Compilation
Documentation about ASP Compilation

Apache2::ASP::Manual::ASP_Compilation - Documentation about ASP Compilation


NAME

Apache2::ASP::Manual::ASP_Compilation - Documentation about ASP Compilation


DESCRIPTION

When Apache2::ASP receives a request for an ASP script, it goes through the following steps:

  1. Does the ASP script exist?
  2. Was it already compiled?
  3. Is the ASP script newer?
  4. Recompile the ASP script if necessary.
  5. Load up the *.pm file.
  6. Execute the *.pm file.

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.


FILE NAMES

If your ASP script is /index.asp then your *.pm file will be index_asp.pm.

If your ASP script is /members/bob/bio.asp then your *.pm file will be members_bob_bio_asp.pm.

And so on.


WHAT IS THE POINT?

ASP scripts are compiled to Perl modules and stored on disk for 2 reasons:

Performance

Even though the ASP parser is quite fast (the Apache2::ASP::Parser manpage) 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.

Testing

Yes - you can test your ASP scripts using the Devel::Cover manpage just like any other Perl module.

You can learn more about this by reading up on the Apache2::ASP::Test::UserAgent manpage.

Please read the Testing Intro at http://apache2-asp.no-ip.org/how-to/website-code-coverage-testing.asp to see how testing works.


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