comparison _test/temp.pl @ 353:feeb3bc4a818

corrected error handling while loading templates corrected variables lookup in controls updated handles to use the new view features
author cin
date Fri, 11 Oct 2013 15:49:04 +0400
parents 675cd1829255
children d5c8b955bf8d
comparison
equal deleted inserted replaced
352:675cd1829255 353:feeb3bc4a818
14 INCLUDE_PATH => './Resources/view', 14 INCLUDE_PATH => './Resources/view',
15 INTERPOLATE => 1, 15 INTERPOLATE => 1,
16 RECURSION => 1000, 16 RECURSION => 1000,
17 COMPILE_DIR => '/tmp/ttc' 17 COMPILE_DIR => '/tmp/ttc'
18 }, 18 },
19 view => 'site', 19 viewBase => 'site',
20 layout => 'layout', 20 layoutBase => 'layout',
21 layout => 'default',
21 includes => [ 22 includes => [
22 'packages' 23 'packages'
23 ] 24 ]
24 ); 25 );
25 26
40 } 41 }
41 }; 42 };
42 43
43 print $view->display( 44 print $view->display(
44 $model, 45 $model,
45 'product/view', 46 'product/view'
46 { layout => 'default' }
47 ), "\n"; 47 ), "\n";
48 48
49 print "render page: ",tv_interval($t,[gettimeofday]),"s\n"; 49 print "render page: ",tv_interval($t,[gettimeofday]),"s\n";
50 50
51 $t = [gettimeofday]; 51 $t = [gettimeofday];
52 52
53 $view->display( 53 $view->display(
54 $model, 54 $model,
55 'product/view', 55 'product/view'
56 { layout => 'default' }
57 ); 56 );
58 57
59 print "2nd render page: ",tv_interval($t,[gettimeofday]),"s\n"; 58 print "2nd render page: ",tv_interval($t,[gettimeofday]),"s\n";
60 59