annotate _test/temp.pl @ 351:cfd7570c2af2

working on TTView: created TTView class for rendering models
author cin
date Tue, 08 Oct 2013 17:40:35 +0400
parents f356c4894d1b
children 675cd1829255
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 {
351
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
5 TTView => 'IMPL::Web::View::TTView'
274
8d36073411b1 +Added AutoDispose class
cin
parents: 223
diff changeset
6 };
8d36073411b1 +Added AutoDispose class
cin
parents: 223
diff changeset
7
351
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
8 use Time::HiRes qw(gettimeofday tv_interval);
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
9
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
10 my $t = [gettimeofday];
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
11
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
12 my $view = TTView->new(
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
13 options => {
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
14 INCLUDE_PATH => './Resources/view',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
15 INTERPOLATE => 1,
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
16 RECURSION => 1000
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
17 },
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
18 view => 'site',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
19 layout => 'layout',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
20 includes => [
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
21 'packages'
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
22 ]
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
23 );
210
6adaeb86945d added IMPL::Web::AutoLocator
sergey
parents: 209
diff changeset
24
351
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
25 print $view->display(
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
26 {
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
27 name => 'debugger',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
28 manufacture => {
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
29 name => 'DEBUGGERS INC',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
30 address => [
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
31 {
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
32 coutry => 'Russuia',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
33 city => 'Moscow'
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
34 },
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
35 {
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
36 country => 'GB',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
37 city => 'Essex'
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
38 }
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
39 ]
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
40 }
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
41 },
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
42 'product/view',
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
43 { layout => 'default' }
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
44 ), "\n";
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
45
cfd7570c2af2 working on TTView: created TTView class for rendering models
cin
parents: 350
diff changeset
46 print "render page: ",tv_interval($t,[gettimeofday]),"ms\n";
215
77a9934a44af sync, migrating to XML::Compile
cin
parents: 210
diff changeset
47