diff Lib/IMPL/Web/View/TTDocument.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents f48a1a9f4fa2
children 0f59b2de72af
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTDocument.pm	Mon Oct 22 04:09:27 2012 +0400
+++ b/Lib/IMPL/Web/View/TTDocument.pm	Mon Oct 29 03:15:22 2012 +0400
@@ -88,8 +88,8 @@
         if ( my $template = $this->loader->template($path) ) {
             my $opts = { %{$this->opts} };
 
-            # avoid propagation of local variables 
-            $opts->{STASH} = $this->stash->clone();
+            # factory will create a clone of the stash 
+            # $opts->{STASH} = $this->stash->clone();
  
             my $ctx = new Template::Context($opts);
             
@@ -128,7 +128,7 @@
             $this->loader->layout($this->layout),
             {
             	%{$newArgs},
-                content => sub { $this->RenderContent($newArgs); },
+                content => $this->RenderContent($newArgs),
                 this => $this,
                 template => $this->template
             }