diff Lib/IMPL/Web/View/TTDocument.pm @ 188:029c9610528c

Memory leak tests in IMPL::Web::View
author cin
date Tue, 03 Apr 2012 20:08:42 +0400
parents 927653d01f4f
children 08015e2803f1
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTDocument.pm	Tue Apr 03 07:54:25 2012 +0400
+++ b/Lib/IMPL/Web/View/TTDocument.pm	Tue Apr 03 20:08:42 2012 +0400
@@ -47,19 +47,19 @@
 	if (my $factory = $this->controls->{$control}) {
 		return $factory;
 	} else {
-		
+=pod		
 		my $path = $control;
 		if ( my $template = $this->loader->template($path) ) {
-			my $opts = { %{$this->opts} };
-			$opts->{STASH} = $this->context->stash->clone();
-			
-			my $ctx = new Template::Context($opts);
+			#my $opts = { %{$this->opts} };
+			#$opts->{STASH} = $this->context->stash->clone();
+ 
+			my $ctx = new Template::Context();#$opts);
 			
 			$factory = new IMPL::Web::View::TTFactory(
 				typeof IMPL::Web::View::TTControl,
 				$template,
 				$ctx,
-				$opts
+				{} #$opts
 			);
 			
 			my @parts = split(/\/+/,$control);
@@ -68,10 +68,11 @@
 			$this->context->stash->set([map { $_, 0 } @parts], $factory);
 						
 			return $factory;
+
 		} else {
 			die new IMPL::KeyNotFoundException($control);
 		}
-		
+=cut		
 	}
 }
 
@@ -82,7 +83,7 @@
 sub Render {
 	my ($this,$args) = @_;
 	
-	my $output = $this->IMPL::Web::TTControl::Render( { document => $this } );
+	my $output = $this->SUPER::Render( { document => $this } );
 	
 	if ($this->layout) {
 		$output = $this->context->include($this->layout, { content => $output } );