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::Server
Utility object for Apache2::ASP programming

Apache2::ASP::Server - Utility object for Apache2::ASP programming



NAME

Apache2::ASP::Server - Utility object for Apache2::ASP programming


DESCRIPTION

The global $Server object is used in ASP programming for utility tasks such as string sanitation, finding files, sending email and registering subroutines to be performed asynchronously.


EXAMPLES


PUBLIC METHODS

new( $asp )

URLEncode( $str )

Returns a URL-Encoded version of the string provided.

For example, ``test@test.com'' becomes ``test%40test.com'' with URLEncode().

HTMLEncode( $str )

Returns an HTML-Encoded version of the string provided.

For example, ``<b>Hello</b>'' becomes ``&lt;b&gt;Hello&lt;/b&gt;'' with HTMLEncode().

HTMLDecode( $str )

Returns an HTML-Decoded version of the string provided.

For example, ``&lt;b&gt;Hello&lt;/b&gt;'' becomes ``<b>Hello</b>'' with HTMLDecode().

MapPath( $path )

Given a relative path MapPath() returns the absolute path to the file on disk.

For example, '/index.asp' might return '/usr/local/dstack/www/index.asp'.

Mail( %args )

A wrapper around the sendmail() function from the Mail::Sendmail manpage.

RegisterCleanup( $sub )

A wrapper around the function cleanup_register( $sub ) function provided by mod_perl2.

Pass in a subref that should be executed after the current request has completed.

For example:


  <%

    $Server->RegisterCleanup(sub { do_something_later() });

    # Do more stuff here:

    $Response->Write("Hello!");

  %>


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