210
|
1 #!/usr/bin/perl
|
|
2 use strict;
|
|
3
|
274
|
4 use IMPL::require {
|
348
|
5 TTContext => 'IMPL::Web::View::TTContext'
|
274
|
6 };
|
|
7
|
348
|
8 my $ctx = TTContext->new({
|
|
9 INCLUDE_PATH => './Resources/view',
|
|
10 INTERPOLATE => 1,
|
|
11 RECURSION => 1000
|
|
12 });
|
210
|
13
|
348
|
14 print $ctx->invoke_environment(sub {
|
|
15 return shift->render(
|
|
16 'product/view',{
|
|
17 model => {
|
|
18 name => 'debugger',
|
|
19 manufature => {
|
|
20 name => 'DEBUGGERS INC',
|
|
21 address => [
|
|
22 {
|
|
23 coutry => 'Russuia',
|
|
24 city => 'Moscow'
|
|
25 },
|
|
26 {
|
|
27 country => 'GB',
|
|
28 city => 'Essex'
|
|
29 }
|
|
30 ]
|
|
31 }
|
|
32 }
|
|
33 }
|
|
34 );
|
|
35 }, {
|
|
36 base => 'site',
|
|
37 includes => [
|
|
38 'packages'
|
|
39 ],
|
|
40 tt_ext => 'tt'
|
|
41 });
|
215
|
42
|