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 {
|
350
|
15 my ($this) = @_;
|
|
16 return $this->render(
|
|
17 'default',
|
|
18 {
|
|
19 content => sub {
|
|
20 return $this->invoke_environment(
|
|
21 sub {
|
|
22 shift->render(
|
|
23 'product/view',
|
|
24 {
|
|
25 model => {
|
|
26 name => 'debugger',
|
|
27 manufature => {
|
|
28 name => 'DEBUGGERS INC',
|
|
29 address => [
|
|
30 {
|
|
31 coutry => 'Russuia',
|
|
32 city => 'Moscow'
|
|
33 },
|
|
34 {
|
|
35 country => 'GB',
|
|
36 city => 'Essex'
|
|
37 }
|
|
38 ]
|
|
39 }
|
|
40 }
|
|
41 }
|
|
42 );
|
|
43 }, {
|
|
44 base => 'site'
|
|
45 }
|
|
46 );
|
|
47 }
|
|
48 }
|
348
|
49 );
|
|
50 }, {
|
350
|
51 base => 'layout',
|
348
|
52 includes => [
|
|
53 'packages'
|
|
54 ],
|
350
|
55 tt_ext => 'tt',
|
|
56 document => {
|
|
57 title => 'Test document'
|
|
58 }
|
348
|
59 });
|
215
|
60
|