[Jifty-commit] r3057 - in Template-Declare: t

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Mar 24 14:10:56 EDT 2007


Author: clkao
Date: Sat Mar 24 14:10:55 2007
New Revision: 3057

Modified:
   Template-Declare/lib/Template/Declare/Tags.pm
   Template-Declare/t/subclassing.t

Log:
rollback r3052 as it's breaking multiroot resolution.

Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm	(original)
+++ Template-Declare/lib/Template/Declare/Tags.pm	Sat Mar 24 14:10:55 2007
@@ -382,21 +382,15 @@
     my $template = shift;
 
     my $INSIDE_TEMPLATE = 0;
-    my $calling_class = caller();
 
     # if we're inside a template, we should show private templates
-    if ( $calling_class->isa('Template::Declare') ) {
-        $INSIDE_TEMPLATE = 1;
-    }
-    else {
-	$calling_class = 'Template::Declare';
-        Template::Declare->new_buffer_frame;
-    }
+    if ( caller()->isa('Template::Declare') ) { $INSIDE_TEMPLATE = 1; }
+    else { Template::Declare->new_buffer_frame }
 
     my $callable =
         ref($template) eq 'CODE'
         ? $template
-        : $calling_class->has_template( $template, $INSIDE_TEMPLATE );
+        : Template::Declare->has_template( $template, $INSIDE_TEMPLATE );
 
     # If the template was not found let the user know.
     unless ( $callable ) {        

Modified: Template-Declare/t/subclassing.t
==============================================================================
--- Template-Declare/t/subclassing.t	(original)
+++ Template-Declare/t/subclassing.t	Sat Mar 24 14:10:55 2007
@@ -63,14 +63,12 @@
     ok_lint($simple);
 }
 
+
 Template::Declare->init(
     roots => [ 'Baseclass::UI', 'Wifty::UI', 'Childclass::UI' ] );
 {
     my $simple = ( show('simple') );
-TODO: {
-local $TODO = 'This is actually collision';
     like( $simple, qr'This is child class content' );
-}
     ok_lint($simple);
 }
 


More information about the Jifty-commit mailing list