diff _test/temp.pl @ 352:675cd1829255

working on TTView: added control classes support
author cin
date Thu, 10 Oct 2013 19:51:19 +0400
parents cfd7570c2af2
children feeb3bc4a818
line wrap: on
line diff
--- a/_test/temp.pl	Tue Oct 08 17:40:35 2013 +0400
+++ b/_test/temp.pl	Thu Oct 10 19:51:19 2013 +0400
@@ -13,7 +13,8 @@
 	options => {
 		INCLUDE_PATH => './Resources/view',
 		INTERPOLATE => 1,
-		RECURSION => 1000
+		RECURSION => 1000,
+		COMPILE_DIR => '/tmp/ttc'
 	},
 	view => 'site',
 	layout => 'layout',
@@ -22,26 +23,38 @@
 	]
 );
 
+my $model = {
+	name => 'debugger',
+	manufacture => {
+		name => 'DEBUGGERS INC',
+		address => [
+			{
+				coutry => 'Russuia',
+				city => 'Moscow'
+			},
+			{
+				country => 'GB',
+				city => 'Essex'
+			}
+		]
+	}
+}; 
+
 print $view->display(
-	{
-		name => 'debugger',
-		manufacture => {
-			name => 'DEBUGGERS INC',
-			address => [
-				{
-					coutry => 'Russuia',
-					city => 'Moscow'
-				},
-				{
-					country => 'GB',
-					city => 'Essex'
-				}
-			]
-		}
-	},
+	$model,
 	'product/view',
 	{ layout => 'default' }
 ), "\n";
 
-print "render page: ",tv_interval($t,[gettimeofday]),"ms\n";
-   
+print "render page: ",tv_interval($t,[gettimeofday]),"s\n";
+
+$t = [gettimeofday];
+
+$view->display(
+	$model,
+	'product/view',
+	{ layout => 'default' }
+);
+
+print "2nd render page: ",tv_interval($t,[gettimeofday]),"s\n";
+