annotate _test/temp.pl @ 348:f116cd9fe7d9

working on TTView: pre-alpha version
author cin
date Thu, 03 Oct 2013 19:48:57 +0400
parents 8d36073411b1
children 86b470004d47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
1 #!/usr/bin/perl
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
2 use strict;
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
3
274
8d36073411b1 +Added AutoDispose class
cin
parents: 223
diff changeset
4 use IMPL::require {
348
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
5 TTContext => 'IMPL::Web::View::TTContext'
274
8d36073411b1 +Added AutoDispose class
cin
parents: 223
diff changeset
6 };
8d36073411b1 +Added AutoDispose class
cin
parents: 223
diff changeset
7
348
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
8 my $ctx = TTContext->new({
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
9 INCLUDE_PATH => './Resources/view',
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
10 INTERPOLATE => 1,
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
11 RECURSION => 1000
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
12 });
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
13
348
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
14 warn $ctx->load_templates->[0]->include_path->[0];
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
15
348
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
16 print $ctx->invoke_environment(sub {
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
17 return shift->render(
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
18 'product/view',{
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
19 model => {
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
20 name => 'debugger',
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
21 manufature => {
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
22 name => 'DEBUGGERS INC',
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
23 address => [
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
24 {
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
25 coutry => 'Russuia',
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
26 city => 'Moscow'
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
27 },
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
28 {
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
29 country => 'GB',
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
30 city => 'Essex'
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
31 }
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
32 ]
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
33 }
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
34 }
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
35 }
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
36 );
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
37 }, {
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
38 base => 'site',
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
39 includes => [
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
40 'packages'
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
41 ],
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
42 tt_ext => 'tt'
f116cd9fe7d9 working on TTView: pre-alpha version
cin
parents: 274
diff changeset
43 });
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
44