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 warn $ctx->load_templates->[0]->include_path->[0];
|
210
|
15
|
348
|
16 print $ctx->invoke_environment(sub {
|
|
17 return shift->render(
|
|
18 'product/view',{
|
|
19 model => {
|
|
20 name => 'debugger',
|
|
21 manufature => {
|
|
22 name => 'DEBUGGERS INC',
|
|
23 address => [
|
|
24 {
|
|
25 coutry => 'Russuia',
|
|
26 city => 'Moscow'
|
|
27 },
|
|
28 {
|
|
29 country => 'GB',
|
|
30 city => 'Essex'
|
|
31 }
|
|
32 ]
|
|
33 }
|
|
34 }
|
|
35 }
|
|
36 );
|
|
37 }, {
|
|
38 base => 'site',
|
|
39 includes => [
|
|
40 'packages'
|
|
41 ],
|
|
42 tt_ext => 'tt'
|
|
43 });
|
215
|
44
|