[Jifty-commit] r6202 - in jifty/trunk: lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Tue Jan 6 17:57:35 EST 2009
Author: alexmv
Date: Tue Jan 6 17:57:35 2009
New Revision: 6202
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
Log:
r40354 at kohr-ah: chmrr | 2009-01-06 17:06:57 -0500
* Add support for "after app" instead of just "After plugin"
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Tue Jan 6 17:57:35 2009
@@ -120,6 +120,9 @@
after plugin NAME =>
RULE(S);
+ after app,
+ RULE(S)
+
C<NAME> may either be a string, which must match the plugin name
exactly, or a regular expression, which is matched against the plugin
name. The rule will be placed at the first boundary that it matches --
@@ -127,6 +130,10 @@
a C<Jifty::Plugin::Auth::Basic> and a C<Jifty::Plugin::Auth::Complex>,
the rules will be placed before the first.
+C<after app> inserts the folowing C<RULES> after the application's
+dispatcher rules, and is identical to, but hopefuly clearer than,
+C<< after plugin Jifty => RULES >>.
+
C<RULES> may either be a single C<before>, C<on>, C<under>, or
C<after> rule to change the ordering of, or an array reference of
rules to reorder.
@@ -269,7 +276,7 @@
HTTPS HTTP
- plugin
+ plugin app
get next_rule last_rule
@@ -314,6 +321,7 @@
sub HTTP ($) { _qualify http => @_ }
sub plugin ($) { return { plugin => @_ } }
+sub app () { return { plugin => 'Jifty' } }
our $CURRENT_STAGE;
@@ -1265,7 +1273,7 @@
push @deferred, $_->dispatcher->rules('DEFERRED') for Jifty->plugins;
push @deferred, $self->rules('DEFERRED');
- # XXX TODO: Examine @deferred and find rles that cannot fire
+ # XXX TODO: Examine @deferred and find rules that cannot fire
# because they match no plugins; they should become un-deferred in
# the appropriate group. This is so 'before plugin qr/Auth/' runs
# even if we have no auth plugin
More information about the Jifty-commit
mailing list