Hey,
I've released the latest Apache::ASP after after months of
hard work on some new exciting features. The change log below
is HUGE, but worth a good read if you are up for it.
The big features on table are custom tags handled by perl
subroutines, very powerful, and full dynamic XML::XSLT
integration. You can read about each of these features at
http://www.nodeworks.com/asp/xml.html
and see them in action at
http://www.nodeworks.com/asp/eg/xml_subs.asp
http://www.nodeworks.com/asp/eg/xslt.xml
Also the session manager is much more robust, and
StateDir will now work over NFS for web clusters even
without NFS network locking.
There is a quick start bundle too! Just use CPAN
to install Bundle::Apache::ASP, and if you want to
use the XML/XSLT feature, install Bundle::XML,
which should include XML::XSLT
ASP 3.0 $Server->Transfer() has been implemented, which is
the $r->internal_redirect for ASP, preserving the current
objects for the new scripts transferred to. You must
$Response->Clear() first in order to get full $Response->Redirect
functionality.
Enjoy! -- Joshua
=== ABOUT Apache::ASP < http://nodeworks.com/asp >
This perl module provides an Active Server Pages port to the Apache Web Server with
perl as the host scripting language. Active Server Pages is a web application platform
that
originated with the Microsoft NT/IIS server. Under Apache for Unix and Win32 platforms
it
allows a developer to create dynamic web applications with session management and
embedded perl code.
Apache::ASP's features include:
* Natural and Powerful Scripting SYNTAX
* Rich OBJECTS Developer API
* Web Application EVENTS Model
* Modular SSI Decomposition, Code Sharing
* User SESSIONS, NFS Web Cluster Friendly
* XML/XSLT Rendering & Custom Tag Technology
* CGI Compatibility
* PERLSCRIPT Compatibility
* Great Open Source SUPPORT
=item $VERSION = 1.93; $DATE="07/03/00";
+ = improvement; - = bug fix
- sub second timing with Time::HiRes was adding <!-- -->
comments by HTML by default, which would possibly
break specific programs looking for precise HTML output.
Now this behavior must be explicitly turned on with
the TimeHiRes config setting.
These comments will only appear in HTML only if
Debug is enabled as well.
Timed log entries will only occur is Debug if
system debugging is enabled, with Debug -1 or -2
=item $VERSION = 1.91; $DATE="07/02/00";
+Documented XMLSubsMatch & XSLT* configuration
settings in CONFIG section.
+XSLT XSL template is now first executed as an
ASP script just like the XML scripts. This is
just one step away now from implementing XSP logic.
+$Server->Execute and $Server->Transfer API extensions
implemented. Execute is the same as $Request->Include()
and $Server->Transfer is like an apache internal redirect
but keeps the current ASP objects for the next script.
Added examples, transfer.htm, and modified dynamic_includes.htm.
+Better compile time error debugging with Debug 2 or -2.
Will hilite/link the buggy line for global.asa errors,
include errors, and XML/XSLT errors just like with
ASP scripts before.
+Nice source hiliting when viewing source for the example
scripts.
+Runtime string writing optimization for static HTML going
through $Response.
+New version numbering just like everyone else. Starting at 1.91
since I seem to be off by a factor of 10, last release would have
been 1.9.
=item $VERSION = 0.19; $DATE="NOT RELEASED";
+XMLSubsMatch and XSLT* settings documented in
the XML/XSLT section of the site/README.
-XMLSubsMatch will strip parens in a pattern match
so it does not interfere with internal matching use.
+XSLT integration allowing XML to be rendered by XSLT
on the fly. XSLT specifies XSL file to transform XML.
XSLTMatch is a regexp that matches XML file names, like \.xml$,
which will be transformed by XSLT setting, default .*
XSLTCacheSize when specified uses Tie::Cache to cached XML DOMs
internally and cache XSLT transformations output per XML/XSL
combination. XML DOM objects can take a lot of RAM, so use
this setting judiciously like setting to 100. Definitely
experiment with this value.
+More client info in the error mail feature, including
client IP, form data, query string, and HTTP_* client headers
+With Time::HiRes loaded, and Debug set to non 0,
will add a <!-- Apache::ASP served request in xx.xx seconds -->
to text/html output, similar to Cocoon, per user request
Will also add this to the system debug error log output
when Debug is < 0
-bug fix on object initialization optimization earlier
in this release, that was introduced for faster event
handler execution.
+Apache::ASP::Parse() takes a file name, scalar, or
scalar ref for arguments of data to parse for greater
integration ability with other applications.
+PodComments optimization, small speed increase at
compilation time.
+String optimization on internal rendering that avoids
unnecessary copying of static html, by using refs. Should
make a small difference on sites with large amounts of
static html.
+CompressGzip setting which, when Compress::Zlib is installed,
will compress text/html automatically going out to the web
browser if the client supports gzip encoding.
++Script_OnFlush event handler, and auxiliary work optimizing
asp events in general. $Response->{BinaryRef} created which
is a reference to outgoing output, which can be used
to modify the data at runtime before it goes out to the client.
+Some code optimizations that boost speed from 22 to 24
hits per second when using Sessions without $Application,
on a simple hello world benchmark on a WinNT PII300.
++Better SessionManagement, more aware of server farms that
don't have reliable NFS locking. The key here is to have only
one process on one server in charge of session garbage collection
at any one time, and try to create this situation with a snazzy
CleanupMaster routine. This is done by having a process register
itself in the internal database with a server key created at
apache start time. If this key gets stale, another process can
become the master, and this period will not exceed the period
SessionTimeout / StateManager.
** Work on session manager sponsored by LRN, http://www.lrn.com. **
** This work was used to deploy a server farm in production with **
** NFS mounted StateDir. Thanks to Craig Samuel for his belief in **
** open source. :) **
Future work for server farm capabilities might include breaking
up the internal database into one of 256 internal databases
hashed by the first 2 chars of the session id. Also on the plate
is Apache::Session like abilities with locking and/or data storage
occuring in a SQL database. The first dbs to be done will include
MySQL & Oracle.
+Better session security which will create a new session id for an
incoming session id that does not match one already seen. This will
help for those with Search engines that have bookmarked
pages with the session ids in the query strings. This breaks away
from standard ASP session id implementation which will automatically
use the session id presented by the browser, now a new session id will
be returned if the presented one is invalid or expired.
-$Application->GetSession will only return a session if
one already existed. It would create one before by default.
+Script_OnFlush global.asa event handler, and $Response->{BinaryRef}
member which is a scalar reference to the content about to be flushed.
See ./site/eg/global.asa for example usage, used in this case to
insert font tags on the fly into the output.
+Highlighting and linking of line error when Debug is set to 2 or -2.
--removed fork() call from flock() backup routine? How did
that get in there? Oh right, testing on Win32. :(
Very painful lesson this one, sorry to whom it may concern.
+$Application->SessionCount support turned off by default
must enable with SessionCount config option. This feature
puts an unnecessary load on busy sites, so not default
behavior now.
++XMLSubsMatch setting that allows the developer to
create custom tags XML style that execute perl subroutines.
See ./site/eg/xml_subs.asp
+MailFrom config option that defaults the From: field for
mails sent via the Mail* configs and $Server->Mail()
+$Server->Mail(\%mail, %smtp_args) API extension
+MailErrorsTo & MailAlertTo now can take comma
separated email addresses for multiple recipients.
-tracking of subroutines defined in scripts and includes so
StatINC won't undefine them when reloading the GlobalPackage,
and so an warning will be logged when another script redefines
the same subroutine name, which has been the bane of at least
a few developers.
-Loader() will now recompile dynamic includes that
have changed, even if main including script has not.
This is useful if you are using Loader() in a
PerlRestartHandler, for reloading scripts when
gracefully restarting apache.
-Apache::ASP used to always set the status to 200 by
default explicitly with $r->status(). This would be
a problem if a script was being used to as a 404
ErrorDocument, because it would always return a 200 error
code, which is just wrong. $Response->{Status} is now
undefined by default and will only be used if set by
the developer.
Note that by default a script will still return a 200 status,
but $Response->{Status} may be used to override this behavior.
+$Server->Config($setting) API extension that allows developer
to access config settings like Global, StateDir, etc., and is a
wrapper around Apache->dir_config($setting)
+Loader() will log the number of scripts
recompiled and the number of scripts checked, instead
of just the number of scripts recompiled, which is
misleading as it reports 0 for child httpds after
a parent fork that used Loader() upon startup.
-Apache::ASP->Loader() would have a bad error if it didn't load
any scripts when given a directory, prints "loaded 0 scripts" now