MasonX::Interp::WithCallbacks 1.10
David Wheeler <[email protected]> Mon, 8 Sep 2003 14:41:54 -0700
| Newsgroups | gmane.comp.web.mason.announce |
|---|---|
| Message-ID | <[email protected]> |
Greetings Fellow Masonites,
I have completed my conversion of my callback subclass from
ApacheHandler to Interp. This means that the callbacks can be used in
any Mason context, not just with mod_perl.
MasonX::ApacheHandler::WithCallbacks is hereby deprecated, and will
soon be deleted from CPAN (though you'll still be able to get it from
BackPAN). Many thanks to the Mason development team for accepting my
multitude of patches to make HTML::Mason::Interp more subclassable. A
result of this change, however, is that MasonX::Interp::WithCallbacks
requires Mason 1.23 or later.
I have also abstracted out all of the callback processing and execution
code to a new module, Params::CallbackRequest. This enables me to keep
the callback code independent of the Mason architecture, and thus work
it in to other templating systems. Look for the addition of callbacks
to Template Toolkit next! This change necessitated some breakage of
backwards compatibility, but nothing that can't be changed with some
simple regex work.
These modules are making their way to CPAN now, but you can get them
here if you're impatient:
http://david.wheeler.net/code/Params-CallbackRequest-1.10.tar.gz
http://david.wheeler.net/code/MasonX-Interp-WithCallbacks-1.10.tar.gz
Here's a complete list of the changes to get you started:
1.10 Mon Sep 8 21:15:42 2003
- Code moved over from MasonX::ApacheHandler::WithCallbacks, which
is deprecated. Differences from that class are as follows.
- Callback handling code from MasonX::ApacheHandler::WithCallbacks
has been migrated to Params::CallbackRequest.
- Code from MasonX::CallbackHandler has been migrated to
Params::Callback.
- MasonX::CallbackTester has been removed, since it isn't
necessary
in a non-mod_perl environment.
- Params::CallbackRequest::Exceptions supplies the exceptions
thrown
by Params::CallbackRequest, since that module is not strictly
connected to Mason.
- Changed the request_args() accessor from MasonX::CallbackHandler
to params() in Params::Callback, to reflect the idea that this
is
a generic parameter-triggered callback architecture.
- Replaced the ah() accessor, since the callback controller isn't
a
Mason ApacheHandler anymore, with cb_request() in
Params::Callback.
- Added cb_request() accessor to MasonX::Interp::WithCallbacks.
- Replaced the "exec_null_cb_values" parameter from
MasonX::ApacheHandler::WithCallbaks, which had defaulted to
true,
with "ignore_nulls" in Params::CallbackRequest, which defaults
to
false.
- Added Params::CallbackRequest notes() interface, which copies
all
notes to the Mason request notes() interface before the request
executes.
Enjoy!
David
--
David Wheeler AIM: dwTheory
[email protected] ICQ: 15726394
http://www.kineticode.com/ Yahoo!: dew7e
Jabber: [email protected]
Kineticode. Setting knowledge in motion.[sm]
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf