diff _test/temp.pl @ 371:d5c8b955bf8d

refactoring
author cin
date Fri, 13 Dec 2013 16:49:47 +0400
parents feeb3bc4a818
children ced5937ff21a
line wrap: on
line diff
--- a/_test/temp.pl	Tue Dec 10 03:02:01 2013 +0400
+++ b/_test/temp.pl	Fri Dec 13 16:49:47 2013 +0400
@@ -1,59 +1,13 @@
 #!/usr/bin/perl
 use strict;
 
-use IMPL::require {
-	TTView => 'IMPL::Web::View::TTView'
-};
-
-use Time::HiRes qw(gettimeofday tv_interval);
-
-my $t = [gettimeofday];
-
-my $view = TTView->new(
-	options => {
-		INCLUDE_PATH => './Resources/view',
-		INTERPOLATE => 1,
-		RECURSION => 1000,
-		COMPILE_DIR => '/tmp/ttc'
-	},
-	viewBase => 'site',
-	layoutBase => 'layout',
-	layout => 'default',
-	includes => [
-		'packages'
-	]
-);
+{
+	local $@;
+	eval {
+		
+		die "oops";
+	};
+}
 
-my $model = {
-	name => 'debugger',
-	manufacture => {
-		name => 'DEBUGGERS INC',
-		address => [
-			{
-				coutry => 'Russuia',
-				city => 'Moscow'
-			},
-			{
-				country => 'GB',
-				city => 'Essex'
-			}
-		]
-	}
-}; 
+print $@;
 
-print $view->display(
-	$model,
-	'product/view'
-), "\n";
-
-print "render page: ",tv_interval($t,[gettimeofday]),"s\n";
-
-$t = [gettimeofday];
-
-$view->display(
-	$model,
-	'product/view'
-);
-
-print "2nd render page: ",tv_interval($t,[gettimeofday]),"s\n";
-