Apache-ASP
view release on metacpan or search on metacpan
NAME
Apache::ASP - Active Server Pages for Apache with mod_perl
SYNOPSIS
SetHandler perl-script
PerlModule Apache::ASP
PerlHandler Apache::ASP
PerlSetVar Global /tmp/asp
DESCRIPTION
Apache::ASP provides an Active Server Pages port to the Apache Web Server
with Perl scripting only, and enables developing of dynamic web applications
with session management and embedded Perl code. There are also many powerful
extensions, including XML taglibs, XSLT rendering, and new events not
originally part of the ASP API!
This module works under the Apache Web Server with the mod_perl module
enabled. See http://www.apache.org and http://perl.apache.org for further
information.
This is a portable solution, similar to ActiveState's PerlScript for NT/IIS
ASP. Work has been done and will continue to make ports to and from this
implementation as smooth as possible.
For Apache::ASP downloading and installation, please read the INSTALL
section. For installation troubleshooting check the FAQ and the SUPPORT
sections.
For database access, ActiveX, scripting languages, and other miscellaneous
issues please read the FAQ section.
WEBSITE
The Apache::ASP web site is at http://www.apache-asp.org/ which you can also
find in the ./site directory of the source distribution.
INSTALL
The installation process for Apache::ASP is geared towards those with
experience with Perl, Apache, and unix systems. For those without this
experience, please understand that the learning curve can be significant.
But what you have at the end will be a web site running on superior open
source software.
If installing onto a Windows operating system, please see the section titled
Win32 Install.
Need Help
Often, installing the mod_perl part of the Apache server can be the hardest
part. If this is the case for you, check out the FAQ and SUPPORT sections
for further help, as well as the "Modern Linux Distributions" notes in this
section.
Please also see the mod_perl site at http://perl.apache.org/ which one ought
to give a good read before undertaking a mod_perl project.
Download and CPAN Install
You may download the latest Apache::ASP from your nearest CPAN, and also:
http://search.cpan.org/dist/Apache-ASP/
http://cpan.org/modules/by-module/Apache/
As a Perl developer, you should make yourself familiar with the CPAN.pm
module, and how it may be used to install Apache::ASP, and other related
modules. The easiest way to install Apache::ASP for the first time from Perl
is to fire up the CPAN shell like:
shell prompt> perl -MCPAN -e shell
... configure CPAN ...
... then upgrade to latest CPAN ...
cpan> install CPAN
...
cpan> install Bundle::Apache::ASP
Installing the Apache::ASP bundle will automatically install all the modules
Apache::ASP is dependent on as well as Apache::ASP itself. If you have
trouble installing the bundle, then try installing the necessary modules one
at a time:
cpan> install MLDBM
cpan> install MLDBM::Sync
cpan> install Digest::MD5 *** may not be needed for perl 5.8+ ***
cpan> install Apache::ASP
For extra/optional functionality in Apache::ASP 2.31 or greater, like
support for FormFill, XSLT, or SSI, you can install this bundle via CPAN:
cpan> install Bundle::Apache::ASP::Extra
Regular Perl Module Install
If not doing the CPAN install, download Apache::ASP and install it using the
make or nmake commands as shown below. Otherwise, just copy ASP.pm to
$PERLLIB/site/Apache
> perl Makefile.PL
> make
> make test
> make install
* use nmake for win32
centrally network mounted file system, while CacheDir might be a local
file cache.
PerlSetVar CacheDir /tmp/asp_demo
On a system like Solaris where there is a RAM disk mounted on the system
like /tmp, I could put the CacheDir there. On a system like Linux where
files are cached pretty well by default, this is less important.
CacheSize
By default, this is 10M of data per cache. When any cache, like the
XSLTCache, reaches this limit, the cache will be purged by deleting the
cached dbm files entirely. This is better for long term running of dbms
than deleting individual records, because dbm formats will often degrade
in performance with lots of insert & deletes.
Units of M, K, and B are supported for megabytes, kilobytes, and bytes,
with the default unit being B, so the following configs all mean the
same thing;
PerlSetVar CacheSize 10M
PerlSetVar CacheSize 10240K
PerlSetVar CacheSize 10485760B
PerlSetVar CacheSize 10485760
There are 2 caches currently, the XSLTCache, and the Response cache, the
latter which is currently invoked for caching output from includes with
special syntax. See $Response->Include() for more info on the Response
cache.
Miscellaneous
AuthServerVariables
default 0. If you are using basic auth and would like
$Request->ServerVariables set like AUTH_TYPE, AUTH_USER, AUTH_NAME,
REMOTE_USER, & AUTH_PASSWD, then set this and Apache::ASP will
initialize these values from Apache->*auth* commands. Use of these
environment variables keeps applications cross platform compatible as
other servers set these too when performing basic 401 auth.
PerlSetVar AuthServerVariables 0
BufferingOn
default 1, if true, buffers output through the response object.
$Response object will only send results to client browser if a
$Response->Flush() is called, or if the asp script ends. Lots of output
will need to be flushed incrementally.
If false, 0, the output is immediately written to the client, CGI style.
There will be a performance hit server side if output is flushed
automatically to the client, but is probably small.
I would leave this on, since error handling is poor, if your asp script
errors after sending only some of the output.
PerlSetVar BufferingOn 1
InodeNames
Default 0. Set to 1 to uses a stat() call on scripts and includes to
derive subroutine namespace based on device and inode numbers. In case
of multiple symbolic links pointing to the same script this will result
in the script being compiled only once. Use only on unix flavours which
support the stat() call that know about device and inode numbers.
PerlSetVar InodeNames 1
RequestParams
Default 0, if set creates $Request->Params object with combined contents
of $Request->QueryString and $Request->Form. This is for developer
convenience simlar to CGI.pm's param() method.
PerlSetVar RequestParams 1
RequestBinaryRead
Default On, if set to Off will not read POST data into $Request->Form().
One potential reason for configuring this to Off might be to initialize
the Apache::ASP object in an Apache handler phase earlier than the
normal PerlRequestHandler phase, so that it does not interfere with
normal reading of POST data later in the request.
PerlSetVar RequestBinaryRead On
StatINC
default 0, if true, reloads perl libraries that have changed on disk
automatically for ASP scripts. If false, the www server must be
restarted for library changes to take effect.
A known bug is that any functions that are exported, e.g. confess Carp
qw(confess), will not be refreshed by StatINC. To refresh these, you
must restart the www server.
This setting should be used in development only because it is so slow.
For a production version of StatINC, see StatINCMatch.
PerlSetVar StatINC 1
StatINCMatch
default undef, if defined, it will be used as a regular expression to
reload modules that match as in StatINC. This is useful because StatINC
has a very high performance penalty in production, so if you can narrow
the modules that are checked for reloading each script execution to a
handful, you will only suffer a mild performance penalty.
The StatINCMatch setting should be a regular expression like: Struct|LWP
which would match on reloading Class/Struct.pm, and all the LWP/.*
libraries.
If you define StatINCMatch, you do not need to define StatINC.
PerlSetVar StatINCMatch .*
StatScripts
default 1, if set to 0, changed scripts, global.asa, and includes will
not be reloaded. Coupled with Apache mod_perl startup and restart
handlers executing Apache::ASP->Loader() for your application this
allows your application to be frozen, and only reloaded on the next
server restart or stop/start.
There are a few advantages for not reloading scripts and modules in
production. First there is a slight performance improvement by not
having to stat() the script, its includes and the global.asa every
Check out the ./site/eg/global.asa for an example of its use.
$Response->{Buffer}
Default 1, when TRUE sends output from script to client only at the end
of processing the script. When 0, response is not buffered, and client
is sent output as output is generated by the script.
$Response->{CacheControl}
Default "private", when set to public allows proxy servers to cache the
content. This setting controls the value set in the HTTP header
Cache-Control
$Response->{Charset}
This member when set appends itself to the value of the Content-Type
HTTP header. If $Response->{Charset} = 'ISO-LATIN-1' is set, the
corresponding header would look like:
Content-Type: text/html; charset=ISO-LATIN-1
$Response->{Clean} = 0-9;
API extension. Set the Clean level, default 0, on a per script basis.
Clean of 1-9 compresses text/html output. Please see the Clean config
option for more information. This setting may also be useful even if
using compression to obfuscate HTML.
$Response->{ContentType} = "text/html"
Sets the MIME type for the current response being sent to the client.
Sent as an HTTP header.
$Response->{Debug} = 1|0
API extension. Default set to value of Debug config. May be used to
temporarily activate or inactivate $Response->Debug() behavior.
Something like:
{
local $Response->{Debug} = 1;
$Response->Debug($values);
}
maybe be used to always log something. The Debug() method can be better
than AppendToLog() because it will log data in data structures one level
deep, whereas AppendToLog prints just raw string/scalar values.
$Response->{Expires} = $time
Sends a response header to the client indicating the $time in SECONDS in
which the document should expire. A time of 0 means immediate
expiration. The header generated is a standard HTTP date like: "Wed, 09
Feb 1994 22:23:32 GMT".
$Response->{ExpiresAbsolute} = $date
Sends a response header to the client with $date being an absolute time
to expire. Formats accepted are all those accepted by
HTTP::Date::str2time(), e.g.
"Wed, 09 Feb 1994 22:23:32 GMT" -- HTTP format
"Tuesday, 08-Feb-94 14:15:29 GMT" -- old rfc850 HTTP format
"08-Feb-94" -- old rfc850 HTTP format
"09 Feb 1994" -- proposed new HTTP format
"Feb 3 1994" -- Unix 'ls -l' format
"Feb 3 17:03" -- Unix 'ls -l' format
$Response->{FormFill} = 0|1
If true, HTML forms generated by the script output will be auto filled
with data from $Request->Form. This feature requires HTML::FillInForm to
be installed. Please see the FormFill CONFIG for more information.
This setting overrides the FormFill config at runtime for the script
execution only.
$Response->{IsClientConnected}
1 if web client is connected, 0 if not. This value starts set to 1, and
will be updated whenever a $Response->Flush() is called. If BufferingOn
is set, by default $Response->Flush() will only be called at the end of
the HTML output.
As of version 2.23 this value is updated correctly before global.asa
Script_OnStart is called, so global script termination may be correctly
handled during that event, which one might want to do with excessive
user STOP/RELOADS when the web server is very busy.
An API extension $Response->IsClientConnected may be called for
refreshed connection status without calling first a $Response->Flush
$Response->{PICS}
If this property has been set, a PICS-Label HTTP header will be sent
with its value. For those that do not know, PICS is a header that is
useful in rating the internet. It stands for Platform for Internet
Content Selection, and you can find more info about it at:
http://www.w3.org
$Response->{Status} = $status
Sets the status code returned by the server. Can be used to set messages
like 500, internal server error
$Response->AddHeader($name, $value)
Adds a custom header to a web page. Headers are sent only before any
text from the main page is sent, so if you want to set a header after
some text on a page, you must turn BufferingOn.
$Response->AppendToLog($message)
Adds $message to the server log. Useful for debugging.
$Response->BinaryWrite($data)
Writes binary data to the client. The only difference from
$Response->Write() is that $Response->Flush() is called internally
first, so the data cannot be parsed as an html header. Flushing flushes
the header if has not already been written.
If you have set the $Response->{ContentType} to something other than
text/html, cgi header parsing (see CGI notes), will be automatically be
turned off, so you will not necessarily need to use BinaryWrite for
writing binary data.
For an example of BinaryWrite, see the binary_write.htm example in
./site/eg/binary_write.htm
Please note that if you are on Win32, you will need to call binmode on a
file handle before reading, if its data is binary.
$Response->Clear()
PerlSetVar XSLTParser XML::LibXSLT
If you would like to install XML::Sablotron or XML::LibXSLT, you will first
have to install the libraries that these perl modules use, which you can get
at:
libxslt - The XSLT C Library for Gnome
http://xmlsoft.org/XSLT/
Sablotron - Ginger Alliance
http://www.gingerall.com
For more on XML::XSLT, the default XSLT engine that Apache::ASP will use,
please see:
XML::XSLT
http://xmlxslt.sourceforge.net/
XML:XSLT was the first supported XSLT engine as has the benefit of being
written in pure perl so that though while it is slower than the other
solutions, it is easier to port.
If you would like to cache XSLT tranformations, which is highly recommended,
just set:
PerlSetVar XSLTCache 1
Please see the Cache settings in the CONFIG section for more about how to
configure the XSLTCache.
References
For more information about XSLT, please see the standard at:
http://www.w3.org/TR/xslt
For their huge ground breaking XML efforts, these other XML OSS projects
need mention:
Cocoon - XML-based web publishing, in Java
http://cocoon.apache.org/
AxKit - XML web publishing with Apache & mod_perl
http://www.axkit.org/
CGI
CGI has been the standard way of deploying web applications long before ASP
came along. In the CGI gateway world, CGI.pm has been a widely used module
in building CGI applications, and Apache::ASP is compatible with scripts
written with CGI.pm. Also, as of version 2.19, Apache::ASP can run in
standalone CGI mode for the Apache web server without mod_perl being
available. See "Standalone CGI Mode" section below.
Following are some special notes with respect to compatibility with CGI and
CGI.pm. Use of CGI.pm in any of these ways was made possible through a great
amount of work, and is not guaranteed to be portable with other perl ASP
implementations, as other ASP implementations will likely be more limited.
Standalone CGI Mode, without mod_perl
As of version 2.19, Apache::ASP scripts may be run as standalone CGI
scripts without mod_perl being loaded into Apache. Work to date has only
been done with mod_cgi scripts under Apache on a Unix platform, and it
is unlikely to work under other web servers or Win32 operating systems
without further development.
To run the ./site/eg scripts as CGI scripts, you copy the ./site
directory to some location accessible by your web server, in this
example its /usr/local/apache/htdocs/aspcgi, then in your httpd.conf
activate Apache::ASP cgi scripts like so:
Alias /aspcgi/ /usr/local/apache/htdocs/aspcgi/
<Directory /usr/local/apache/htdocs/aspcgi/eg/ >
AddType application/x-httpd-cgi .htm
AddType application/x-httpd-cgi .html
AddType application/x-httpd-cgi .asp
AddType application/x-httpd-cgi .xml
AddType application/x-httpd-cgi .ssi
AllowOverride None
Options +ExecCGI +Indexes
</Directory>
Then install the asp-perl script from the distribution into /usr/bin, or
some other directory. This is so the CGI execution line at the top of
those scripts will invoke the asp-perl wrapper like so:
#!/usr/bin/perl /usr/bin/asp-perl
The asp-perl script is a cgi wrapper that sets up the Apache::ASP
environment in lieu of the normal mod_perl handler request. Because
there is no Apache->dir_config() data available under mod_cgi, the
asp-perl script will load a asp.conf file that may define a hash %Config
of data for populating the dir_config() data. An example of a complex
asp.conf file is at ./site/eg/asp.conf
So, a trivial asp.conf file might look like:
# asp.conf
%Config = (
'Global' => '.',
'StateDir' => '/tmp/aspstate',
'NoState' => 0,
'Debug' => 3,
);
The default for NoState is 1 in CGI mode, so one must set NoState to 0
for objects like $Session & $Application to be defined.
CGI.pm
CGI.pm is a very useful module that aids developers in the building of
these applications, and Apache::ASP has been made to be compatible with
function calls in CGI.pm. Please see cgi.htm in the ./site/eg directory
for a sample ASP script written almost entirely in CGI.
As of version 0.09, use of CGI.pm for both input and output is seamless
when working under Apache::ASP. Thus if you would like to port existing
cgi scripts over to Apache::ASP, all you need to do is wrap <% %> around
the script to get going. This functionality has been implemented so that
developers may have the best of both worlds when building their web
applications.
For more information about CGI.pm, please see the web site
:) Francesco Pasqualini, for bug fixes with stand alone CGI mode on Win32
:) Szymon Juraszczyk, for better ContentType handling for settings like Clean.
:) Oleg Kobyakovskiy, for identifying the double Session_OnEnd cleanup bug.
:) Peter Galbavy, for reporting numerous bugs and maintaining the OpenBSD port.
:) Richard Curtis, for reporting and working through interesting module
loading issues under mod_perl2 & apache2, and pushing on the file upload API.
:) Rune Henssel, for catching a major bug shortly after 2.47 release,
and going to great lengths to get me reproducing the bug quickly.
:) Broc, for keeping things filter aware, which broke in 2.45,
& much help on the list.
:) Manabu Higashida, for fixes to work under perl 5.8.0
:) Slaven Rezic, for suggestions on smoother CPAN installation
:) Mitsunobu Ozato, for working on a japanese translation of the site & docs.
:) Eamon Daly for persistence in resolving a MailErrors bug.
:) Gert, for help on the mailing list, and pushing the limits of use on Win32
in addition to XSLT.
:) Maurice Aubrey, for one of the early fixes to the long file name problem.
:) Tom Lancaster, for pushing the $Server->Mail API and general API discussion.
:) Ross Thomas, for pushing into areas so far unexplored.
:) Harald Kreuzer, for bug discovery & subsequent testing in the 2.25 era.
:) Michael Buschauer for his extreme work with XSLT.
:) Dariusz Pietrzak for a nice parser optimization.
:) Ime Smits, for his inode patch facilitating cross site code reuse, and
some nice performance enhancements adding another 1-2% speed.
:) Michael Davis, for easier CPAN installation.
:) Brian Wheeler, for keeping up with the Apache::Filter times,
and pulling off filtering ASP->AxKit.
:) Ged Haywood, for his great help on the list & professionally.
:) Vee McMillen, for OSS patience & understanding.
:) Craig Samuel, at LRN, for his faith in open source for his LCEC.
:) Geert Josten, for his wonderful work on XML::XSLT
:) Gerald Richter, for his Embperl, collaboration and competition!
:) Stas Bekman, for his beloved guide, and keeping us all worldly.
:) Matt Sergeant, again, for ever the excellent XML critique.
:) Remi Fasol + Serge Sozonoff who inspired cookieless sessions.
:) Matt Arnold, for the excellent graphics !
:) Adi, who thought to have full admin control over sessions
:) Dmitry Beransky, for sharable web application includes, ASP on the big.
:) Russell Weiss again, for finding the internal session garbage collection
behaving badly with DB_File sensitive i/o flushing requirements.
:) Tony Merc Mobily, inspiring tweaks to compile scripts 10 times faster
:) Paul Linder, who is Mr. Clean... not just the code, its faster too !
Boy was that just the beginning. Work with him later facilitated better
session management and XMLSubsMatch custom tag technology.
:) Russell Weiss, for being every so "strict" about his code.
:) Bill McKinnon, who understands the finer points of running a web site.
:) Richard Rossi, for his need for speed & boldly testing dynamic includes.
:) Greg Stark, for endless enthusiasm, pushing the module to its limits.
:) Marc Spencer, who brainstormed dynamic includes.
:) Doug Silver, for finding most of the bugs.
:) Darren Gibbons, the biggest cookie-monster I have ever known.
:) Ken Williams, for great teamwork bringing full SSI to the table
:) Matt Sergeant, for his great tutorial on PerlScript and love of ASP
:) Jeff Groves, who put a STOP to user stop button woes
:) Alan Sparks, for knowing when size is more important than speed
:) Lincoln Stein, for his blessed CGI.pm module
:) Michael Rothwell, for his love of Session hacking
:) Francesco Pasqualini, for bringing ASP to CGI
:) Bryan Murphy, for being a PerlScript wiz
:) Lupe Christoph, for his immaculate and stubborn testing skills
:) Ryan Whelan, for boldly testing on Unix in the early infancy of ASP
SUPPORT
COMMUNITY
Mailing List Archives
Try the Apache::ASP mailing list archive first when working through an
issue as others may have had the same question as you, then try the
mod_perl list archives since often problems working with Apache::ASP are
really mod_perl ones.
The Apache::ASP mailing list archives are located at:
http://groups.yahoo.com/group/apache-asp/
http://www.mail-archive.com/asp%40perl.apache.org/
The mod_perl mailing list archives are located at:
http://mail-archives.apache.org/mod_mbox/perl-modperl/
Mailing List
Please subscribe to the Apache::ASP mailing list by sending an email to
asp-subscribe[at]perl.apache.org and send your questions or comments to
the list after your subscription is confirmed.
To unsubscribe from the Apache::ASP mailing list, just send an email to
asp-unsubscribe[at]perl.apache.org
If you think this is a mod_perl specific issue, you can send your
question to modperl[at]apache.org
Donations
Apache::ASP is freely distributed under the terms of the Perl artistic
license ( see the LICENSE section ). If you would like to donate time to
the project, please get involved on the Apache::ASP Mailing List, and
submit ideas, bug fixes and patches for the core system, and perhaps
most importantly to simply support others in learning the ins and outs
of the software.
COMMERCIAL
If you would like commercial support for Apache::ASP, please check out any
of the following listed companies. Note that this is not an endorsement, and
if you would like your company listed here, please email
asp[at]perl.apache.org with your information.
AlterCom
We use, host and support mod_perl. We would love to be able to help
anyone with their mod_perl Apache::ASP needs. Our mod_perl hosting is
$24.95 mo.
http://altercom.com/home.html
The Cyberchute Connection
Our hosting services support Apache:ASP along with Mod_Perl, PHP and
MySQL.
http://www.Cyberchute.com
OmniTI
OmniTI supports Apache and mod_perl (including Apache::ASP) and offers
competitive pricing for both hourly and project-based jobs. OmniTI has
extensive experience managing and maintaining both large and small
-Now file upload forms, forms with ENCTYPE="multipart/form-data"
can have multiple check boxes and select items marked for
@params = $Request->Form('param_name') functionality. This
will be demonstrated via the ./site/eg/file_upload.asp example.
$VERSION = 2.11; $DATE="05/29/2001";
+Parser optimization from Dariusz Pietrzak
-work around for global destruction error message for perl 5.6
during install
+$Response->{IsClientConnected} now will be set
correctly with ! $r->connection->aborted after each
$Response->Flush()
+New XSLTParser config which can be set to XML::XSLT or
XML::Sablotron. XML::Sablotron renders 10 times faster,
but differently. XML::XSLT is pure perl, so has wider
platform support than XML::Sablotron. This config affects
both the XSLT config and the $Server->XSLT() method.
+New $Server->XSLT(\$xsl_data, \$xml_data) API which
allows runtime XSLT on components instead of having to process
the entire ASP output as XSLT.
-XSLT support for XML::XSL 0.32. Things broke after .24.
-XSLTCacheSize config no longer supported. Was a bad
Tie::Cache implementation. Should be file based cache
to greatly increases cache hit ratio.
++$Response->Include(), $Response->TrapInclude(),
and $Server->Execute() will all take a scalar ref
or \'asdfdsafa' type code as their first argument to execute
a raw script instead of a script file name. At this time,
compilation of such a script, will not be cached. It is
compiled/executed as an anonymous subroutine and will be freed
when it goes out of scope.
+ -p argument to cgi/asp script to set GlobalPackage
config for static site builds
-pod commenting fix where windows clients are used for
ASP script generation.
+Some nice performance enhancements, thank to submissions from
Ime Smits. Added some 1-2% per request execution speed.
+Added StateDB MLDBM::Sync::SDBM_File support for faster
$Session + $Application than DB_File, yet still overcomes
SDBM_File's 1024 bytes value limitation. Documented in
StateDB config, and added Makefile.PL entry.
+Removed deprecated MD5 use and replace with Digest::MD5 calls
+PerlSetVar InodeNames 1 config which will compile scripts hashed by
their device & inode identifiers, from a stat($file)[0,1] call.
This allows for script directories, the Global directory,
and IncludesDir directories to be symlinked to without
recompiling identical scripts. Likely only works on Unix
systems. Thanks to Ime Smits for this one.
+Streamlined code internally so that includes & scripts were
compiled by same code. This is a baby step toward fusing
include & script code compilation models, leading to being
able to compile bits of scripts on the fly as ASP subs,
and being able to garbage collect ASP code subroutines.
-removed @_ = () in script compilation which would trigger warnings
under PerlWarn being set, thanks for Carl Lipo for reporting this.
-StatINC/StatINCMatch fix for not undeffing compiled includes
and pages in the GlobalPackage namespace
-Create new HTML::FillInForm object for each FormFill
done, to avoid potential bug with multiple forms filled
by same object. Thanks to Jim Pavlick for the tip.
+Added PREREQ_PM to Makefile.PL, so CPAN installation will
pick up the necessary modules correctly, without having
to use Bundle::Apache::ASP, thanks to Michael Davis.
+ > mode for opening lock files, not >>, since its faster
+$Response->Flush() fixed, by giving $| = 1 perl hint
to $r->print() and the rest of the perl sub.
+$Response->{Cookies}{cookie_name}{Expires} = -86400 * 300;
works so negative relative time may be used to expire cookies.
+Count() + Key() Collection class API implementations
+Added editors/aasp.vim VIM syntax file for Apache::ASP,
courtesy of Jon Topper.
++Better line numbering with #line perl pragma. Especially
helps with inline includes. Lots of work here, & integrated
with Debug 2 runtime pretty print debugging.
+$Response->{Debug} member toggles on/off whether
$Response->Debug() is active, overriding the Debug setting
for this purpose. Documented.
-When Filter is on, Content-Length won't be set and compression
won't be used. These things would not work with a filtering
handler after Apache::ASP
$VERSION = 2.09; $DATE="01/30/2001";
+Examples in ./site/eg are now UseStrict friendly.
Also fixed up ./site/eg/ssi_filter.ssi example.
+Auto purge of old stale session group directories, increasing
session manager performance when using Sessions when migrating
to Apache::ASP 2.09+ from older versions.
+SessionQueryParse now works for all $Response->{ContentType}
starting with 'text' ... before just worked with text/html,
now other text formats like wml will work too.
+32 groups instead of 64, better inactive site session group purging.
-Fixed AUTOLOAD state bug, which wouldn't let you each through state
objects, like %{$Session}, or each %$Session, (bug introduced in v.04)
+Parses ASP white space better. HTML output matches author's intent
by better dealing with white space surrounding <% perl blocks %>
-Scalar insertion code <%=$foo%> can now span many lines.
+Added include.t test script for includes.
+Script recompiles when included files change.
+Files can be included in script with
SSI <!--#include file="filename"--> syntax, needs to be
done in ASP module to allow compilation of included code and html
into script. Future chaining with Apache::SSI will allow static
html includes, and other SSI directives
$VERSION = 0.04; $DATE="10/14/1998";
+Example script eg/cgi.htm demonstrating CGI.pm use for output.
+Optimized ASP parsing, faster and more legible executing code
: try 'die();' in code with setting PerlSetVar Debug 2
+Cleaned up code for running with 'use strict'
-Fixed directory handle leak on Solaris, from not closing after opendir()
+StatINC overhaul. StatINC setting now works as it should, with
the caveat that exported functions will not be refreshed.
+NoState setting optimization, disallows $Application & $Session
+$Application->*Lock() functions implemented
-SoftRedirect setting for those who want scripts to keep running
after a Redirect()
+SessionSerialize setting to lock session while script is running
: Microsoft ASP style session locking
: For a session, scripts execute one at a time
: NOT recommended use, please see note.
-MLDBM can be used for other things without messing up internal use
: before if it was used with different DB's and serializers,
internal state could be lost.
--State file locking. Corruption worries, and loss of data no more.
+CGI header support, developer can use CGI.pm for *output*, or just print()
: print "Set-Cookie: test=cookie\n", and things will just work
: use CGI.pm for output
: utilizes $r->send_cgi_header(), thanks Doug!
+Improved Cookie implementation, more flexible and complete
- Domain cookie key now works
: Expire times now taken from time(), and relative time in sec
: Request->Cookies() reading more flexible, with wantarray()
on hash cookie values, %hash = $Request->Cookie('test');
-make test module naming correction, was t.pm, now T.pm for Unix
+POD / README cleanup, formatting and HTML friendly.
$VERSION = 0.03; $DATE="09/14/1998";
+Installation 'make test' now works
+ActiveX objects on Win32 implemented with $Server->CreateObject()
+Cookies implemented: $Response->Cookies() & $Request->Cookies()
-Fixed $Response object API, converting some methods to object members.
Deprecated methods, but backwards compatible.
+Improved error messaging, debug output
+$, influences $Response->Write(@strings) behavior
+perl print() works, sending output to $Response object
+$Response->Write() prints scalars, arrays, and hashes. Before only scalars.
+Begin implementation of $Server object.
+Implemented $Response->{Expires} and $Response->{ExpiresAbsolute}
+Added "PerlSetVar StatINC" config option
+$0 is aliased to current script filename
+ASP Objects ($Response, etc.) are set in main package
Thus notation like $main::Response->Write() can be used anywhere.
$VERSION = 0.02; $DATE="07/12/1998";
++Session Manager, won't break under denial of service attack
+Fleshed out $Response, $Session objects, almost full implementation.
+Enormously more documentation.
-Fixed error handling with Debug = 2.
-Documentation fixed for pod2man support. README now more man-like.
-Stripped \r\n dos characters from installation files
-755 mode set for session state directory when created
-Loads Win32/OLE properly, won't break with UNIX
$VERSION = 0.01; $DATE="06/26/1998";
Syntax Support
--------------
Initial release, could be considered alpha software.
Allows developers to embed perl in html ASP style.
<!-- sample here -->
<html>
<body>
<% for(1..10) { %>
counting: <%=$_%> <br>
( run in 2.298 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )