[Jifty-commit] r3109 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Apr 6 12:12:03 EDT 2007
Author: jesse
Date: Fri Apr 6 12:12:03 2007
New Revision: 3109
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Dispatcher.pm
jifty/trunk/lib/Jifty/Handler.pm
Log:
r54529 at dhcp207: jesse | 2007-04-07 01:08:43 +0900
* Refactor and extract
Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm Fri Apr 6 12:12:03 2007
@@ -1115,8 +1115,6 @@
return $text;
}
-sub _template_handlers { qw(declare_handler mason) }
-sub _fallback_template_handler { 'mason' }
=head2 template_exists PATH
@@ -1129,7 +1127,7 @@
my $self = shift;
my $template = shift;
- foreach my $handler ( $self->_template_handlers) {
+ foreach my $handler ( Jifty->handler->_template_handlers) {
if ( Jifty->handler->$handler->template_exists($template) ) {
return 1;
}
@@ -1152,14 +1150,14 @@
my $template = shift;
my $showed = 0;
eval {
- foreach my $handler ( $self->_template_handlers ) {
+ foreach my $handler (Jifty->handler->_template_handlers ) {
if (Jifty->handler->$handler->template_exists($template) ) {
$showed = 1;
Jifty->handler->$handler->show($template);
last;
}
}
- if (not $showed and my $fallback_handler = $self->_fallback_template_handler) {
+ if (not $showed and my $fallback_handler = Jifty->handler->_fallback_template_handler) {
Jifty->handler->$fallback_handler->show($template);
}
Modified: jifty/trunk/lib/Jifty/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/Handler.pm Fri Apr 6 12:12:03 2007
@@ -72,6 +72,9 @@
return $self;
}
+sub _template_handlers { qw(declare_handler mason) }
+sub _fallback_template_handler { 'mason' }
+
=head2 setup_view_handlers
Initialize all of our view handlers.
More information about the Jifty-commit
mailing list