changeset 309:5e4e7c8fbca1

sync
author cin
date Fri, 19 Apr 2013 00:27:51 +0400
parents 47a09a8dc23a
children 0a9d51cf6dfd
files Lib/IMPL/Web/View/TTDocument.pm Lib/IMPL/Web/View/TTFactory.pm Lib/IMPL/Web/View/TTLoader.pm Lib/IMPL/Web/View/TTRegistry.pm _test/dump.out
diffstat 5 files changed, 60 insertions(+), 275 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTDocument.pm	Thu Apr 18 20:06:05 2013 +0400
+++ b/Lib/IMPL/Web/View/TTDocument.pm	Fri Apr 19 00:27:51 2013 +0400
@@ -6,19 +6,20 @@
 use IMPL::lang qw(:hash is);
 use Carp qw(carp);
 use mro;
-
+use IMPL::Exception();
 use IMPL::declare {
     require => {
     	TTRegistry => 'IMPL::Web::View::TTRegistry',
         TTFactory => 'IMPL::Web::View::TTFactory',
         TTControl =>  'IMPL::Web::View::TTControl',
-        Loader => 'IMPL::Code::Loader'
+        Loader => 'IMPL::Code::Loader',
+        OpException => '-IMPL::InvalidOperationException'
     },
     base => [
         'IMPL::Web::View::TTControl' => sub {
-            my ($template,$ctx) = @_;
+            my ($template,$ctx,$vars) = @_;
             $ctx ||= Template::Context->new();
-            return $template, $ctx;  # context
+            return $template, $ctx, $vars;  # context
         }
     ],
     props => [
@@ -52,7 +53,8 @@
     my $text = eval {
     
         if ($this->layout) {
-        	my $tlayout = $this->GetTemplate($this->layout);
+        	my $tlayout = $this->registry->loader->layout($this->layout)
+        	   or die OpException->new('The specified layout isn\'t found', $this->layout);
         	if(my $init = $tlayout->blocks->{INIT}) {
         		$this->context->process(
                     $init,
--- a/Lib/IMPL/Web/View/TTFactory.pm	Thu Apr 18 20:06:05 2013 +0400
+++ b/Lib/IMPL/Web/View/TTFactory.pm	Fri Apr 19 00:27:51 2013 +0400
@@ -18,7 +18,7 @@
     },
     base => [
         'IMPL::Object::Factory' => sub {
-            shift->class || 'IMPL::Web::View::TTControl';
+            shift;
         }
     ],
     props => [
@@ -34,12 +34,14 @@
 };
 
 sub CTOR {
-    my ($this,$template,$context,$path,$registry) = @_;
+    my ($this,$class,$template,$context,$path,$registry) = @_;
     
+    die ArgException->new("A control class must be specified")
+        unless $class;
     die ArgException->new("A template is required") unless $template;
     
-    Loader->safe->Require($this->factory)
-        if $this->factory and not ref $this->factory;
+    Loader->safe->Require($class)
+        unless ref $class ;
     
     $context ||= new Template::Context();
     my $baseLocation = join( '/', splice( @{[split(/\//,$path)]}, 0, -1 ) );
--- a/Lib/IMPL/Web/View/TTLoader.pm	Thu Apr 18 20:06:05 2013 +0400
+++ b/Lib/IMPL/Web/View/TTLoader.pm	Fri Apr 19 00:27:51 2013 +0400
@@ -8,7 +8,9 @@
     require => {
         Provider => 'Template::Provider',
         Context => 'Template::Context',
+        TTRegistry => 'IMPL::Web::View::TTRegistry',
         TTFactory => 'IMPL::Web::View::TTFactory',
+        TTDocument => '-IMPL::Web::View::TTDocument',
         Exception => 'IMPL::Exception',
         ArgumentException => '-IMPL::InvalidArgumentException',
         KeyNotFoundException => '-IMPL::KeyNotFoundException'
@@ -71,7 +73,7 @@
 sub document {
     my ($this,$name,$vars) = @_;
     
-    $vars ||= $vars;
+    $vars ||= {};
     
     my $tt = $this->template($name);
         
@@ -83,9 +85,13 @@
     my $ctx = _clone_context($this->context);
     $this->context->delocalise();
     
-    my $factory = TTFactory->new($tt,$ctx,$name,TTRegistry->new($this, $ctx));
+    my $registry = TTRegistry->new($this, $ctx);
+    
+    my $factory = TTFactory->new($tt->class || TTDocument, $tt, $ctx, $name, $registry);
     
-    return $factory->new( $vars );
+    $vars->{registry} = $registry;
+    
+    return $factory->new( $vars );    
 }
 
 
--- a/Lib/IMPL/Web/View/TTRegistry.pm	Thu Apr 18 20:06:05 2013 +0400
+++ b/Lib/IMPL/Web/View/TTRegistry.pm	Fri Apr 19 00:27:51 2013 +0400
@@ -5,7 +5,8 @@
 use IMPL::Const qw(:prop);
 use IMPL::declare {
     require => {
-        TTFactory => 'IMPL::Web::View::TTFactory'        
+        TTFactory => 'IMPL::Web::View::TTFactory',
+        TTControl => '-IMPL::Web::View::TTControl'
     },
     base => [
         'IMPL::Object' => undef,
@@ -36,6 +37,7 @@
             or die AppException->new("Failed to load a template $name");
          
         $factory = TTFactory->new(
+            $template->class || TTControl,
             $template,
             $this->context,
             $name,
--- a/_test/dump.out	Thu Apr 18 20:06:05 2013 +0400
+++ b/_test/dump.out	Fri Apr 19 00:27:51 2013 +0400
@@ -1,5 +1,6 @@
 $VAR1 = [
           bless( {
+                   'require' => sub { "DUMMY" },
                    'global' => {},
                    'inc' => sub { "DUMMY" },
                    'date' => {
@@ -12,9 +13,7 @@
                    'site' => {
                                'name' => 'Test Site'
                              },
-                   'view' => {
-                               'mode' => 'default'
-                             },
+                   'view' => {},
                    'dojo' => {
                                'require' => []
                              },
@@ -38,7 +37,9 @@
                  }, 'Template::Stash::XS' ),
           bless( {
                    'PREFIX_MAP' => {},
-                   'BLOCKS' => {},
+                   'BLOCKS' => {
+                                 'CTOR' => sub { "DUMMY" }
+                               },
                    'TRIM' => 0,
                    'CONFIG' => {
                                  'PREFIX_MAP' => $VAR1->[1]{'PREFIX_MAP'},
@@ -86,103 +87,37 @@
                                                                 'COMPILE_DIR' => '',
                                                                 'HEAD' => [
                                                                             undef,
-                                                                            '/home/sergey/workspace.web/Impl/_test/Resources/TTView/My/Org/TextPreview.tt',
+                                                                            '/home/sergey/workspace.web/Impl/_test/Resources/TTView/simple.tt',
                                                                             bless( {
                                                                                      '_DEFBLOCKS' => {
-                                                                                                       'INIT' => sub { "DUMMY" }
+                                                                                                       'CTOR' => $VAR1->[1]{'BLOCKS'}{'CTOR'}
                                                                                                      },
+                                                                                     '_VARIABLES' => {},
+                                                                                     'modtime' => 1343890751,
+                                                                                     'version' => '10',
+                                                                                     'name' => 'simple.tt',
                                                                                      '_BLOCK' => sub { "DUMMY" },
-                                                                                     '_VARIABLES' => {},
-                                                                                     'modtime' => 1364195248,
-                                                                                     'name' => 'My/Org/TextPreview.tt',
+                                                                                     'title' => "\x{414}\x{43e}\x{43a}\x{443}\x{43c}\x{435}\x{43d}\x{442} 1",
                                                                                      '_HOT' => 0
                                                                                    }, 'Template::Document' ),
-                                                                            1364195248,
+                                                                            1343890751,
                                                                             [
                                                                               $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'},
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/My/Org/Panel.tt',
+                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/global.tt',
                                                                               bless( {
-                                                                                       '_DEFBLOCKS' => {
-                                                                                                         'INIT' => sub { "DUMMY" }
-                                                                                                       },
+                                                                                       '_DEFBLOCKS' => {},
                                                                                        '_BLOCK' => sub { "DUMMY" },
                                                                                        '_VARIABLES' => {},
-                                                                                       'modtime' => 1364195248,
+                                                                                       'modtime' => 1343890751,
                                                                                        'version' => '1',
-                                                                                       'name' => 'My/Org/Panel.tt',
+                                                                                       'name' => 'global.tt',
                                                                                        '_HOT' => 0
                                                                                      }, 'Template::Document' ),
-                                                                              1364195248,
-                                                                              [
-                                                                                $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4],
-                                                                                '/home/sergey/workspace.web/Impl/_test/Resources/TTView/Layout/default.tt',
-                                                                                bless( {
-                                                                                         '_DEFBLOCKS' => {
-                                                                                                           'INIT' => sub { "DUMMY" }
-                                                                                                         },
-                                                                                         '_BLOCK' => sub { "DUMMY" },
-                                                                                         '_VARIABLES' => {},
-                                                                                         'modtime' => 1361182966,
-                                                                                         'name' => 'Layout/default.tt',
-                                                                                         '_HOT' => 0
-                                                                                       }, 'Template::Document' ),
-                                                                                1361182966,
-                                                                                [
-                                                                                  $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4],
-                                                                                  '/home/sergey/workspace.web/Impl/_test/Resources/TTView/complex.tt',
-                                                                                  bless( {
-                                                                                           '_DEFBLOCKS' => {},
-                                                                                           '_VARIABLES' => {},
-                                                                                           'modtime' => 1364195248,
-                                                                                           'version' => '1',
-                                                                                           'name' => 'complex.tt',
-                                                                                           'layout' => 'default',
-                                                                                           '_BLOCK' => sub { "DUMMY" },
-                                                                                           '_HOT' => 0,
-                                                                                           'title' => 'my document 2'
-                                                                                         }, 'Template::Document' ),
-                                                                                  1364195248,
-                                                                                  [
-                                                                                    $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4],
-                                                                                    '/home/sergey/workspace.web/Impl/_test/Resources/TTView/simple.tt',
-                                                                                    bless( {
-                                                                                             '_DEFBLOCKS' => {
-                                                                                                               'CTOR' => sub { "DUMMY" }
-                                                                                                             },
-                                                                                             '_VARIABLES' => {},
-                                                                                             'modtime' => 1343890751,
-                                                                                             'version' => '10',
-                                                                                             'name' => 'simple.tt',
-                                                                                             '_BLOCK' => sub { "DUMMY" },
-                                                                                             'title' => "\x{414}\x{43e}\x{43a}\x{443}\x{43c}\x{435}\x{43d}\x{442} 1",
-                                                                                             '_HOT' => 0
-                                                                                           }, 'Template::Document' ),
-                                                                                    1343890751,
-                                                                                    [
-                                                                                      $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][4],
-                                                                                      '/home/sergey/workspace.web/Impl/_test/Resources/TTView/global.tt',
-                                                                                      bless( {
-                                                                                               '_DEFBLOCKS' => {},
-                                                                                               '_BLOCK' => sub { "DUMMY" },
-                                                                                               '_VARIABLES' => {},
-                                                                                               'modtime' => 1343890751,
-                                                                                               'version' => '1',
-                                                                                               'name' => 'global.tt',
-                                                                                               '_HOT' => 0
-                                                                                             }, 'Template::Document' ),
-                                                                                      1343890751,
-                                                                                      undef,
-                                                                                      1366207151
-                                                                                    ],
-                                                                                    1366207151
-                                                                                  ],
-                                                                                  1366207151
-                                                                                ],
-                                                                                1366207151
-                                                                              ],
-                                                                              1366207151
+                                                                              1343890751,
+                                                                              undef,
+                                                                              1366316725
                                                                             ],
-                                                                            1366207151
+                                                                            1366316725
                                                                           ],
                                                                 'DELIMITER' => ':',
                                                                 'UNICODE' => 1,
@@ -198,16 +133,12 @@
                                                                 'STAT_TTL' => 1,
                                                                 'ABSOLUTE' => 0,
                                                                 'LOOKUP' => {
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/global.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][4][4],
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/My/Org/Panel.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4],
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/simple.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][4],
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/My/Org/TextPreview.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'},
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/Layout/default.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4],
-                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/complex.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4]
+                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/global.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4],
+                                                                              '/home/sergey/workspace.web/Impl/_test/Resources/TTView/simple.tt' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}
                                                                             },
                                                                 'DEFAULT' => undef,
                                                                 'PARSER' => bless( {
-                                                                                     'FILE' => 'complex.tt',
+                                                                                     'FILE' => 'global.tt',
                                                                                      'ANYCASE' => 0,
                                                                                      'FACTORY' => bless( {
                                                                                                            'DEBUG' => 0,
@@ -5278,7 +5209,7 @@
                                                                                      'INTERPOLATE' => 1,
                                                                                      'FILEINFO' => [],
                                                                                      '_ERROR' => '',
-                                                                                     'LINE' => \10,
+                                                                                     'LINE' => \'1-6',
                                                                                      'LEXTABLE' => {
                                                                                                      'SET' => 'SET',
                                                                                                      '/' => '/',
@@ -6280,14 +6211,10 @@
                                                                                      'RULES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'PARSER'}{'GRAMMAR'}{'RULES'},
                                                                                      'FILE_INFO' => 1,
                                                                                      'TRACE_VARS' => undef,
-                                                                                     'DEFBLOCK' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][2]{'_DEFBLOCKS'},
+                                                                                     'DEFBLOCK' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][2]{'_DEFBLOCKS'},
                                                                                      'METADATA' => [
                                                                                                      'version',
-                                                                                                     '1',
-                                                                                                     'title',
-                                                                                                     'my document 2',
-                                                                                                     'layout',
-                                                                                                     'default'
+                                                                                                     '1'
                                                                                                    ],
                                                                                      'END_TAG' => undef,
                                                                                      'IN_BLOCK' => [],
@@ -6304,12 +6231,12 @@
                                                                                                     'START_TAG' => '\\[%'
                                                                                                   }
                                                                                                 ],
-                                                                                     'VARIABLES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][2]{'_VARIABLES'},
+                                                                                     'VARIABLES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][2]{'_VARIABLES'},
                                                                                      'START_TAG' => undef
                                                                                    }, 'Template::Parser' ),
-                                                                'TAIL' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][4][4],
+                                                                'TAIL' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4],
                                                                 'ENCODING' => 'utf-8',
-                                                                'SLOTS' => 6,
+                                                                'SLOTS' => 2,
                                                                 'PARAMS' => {
                                                                               'ENCODING' => 'utf-8',
                                                                               'INTERPOLATE' => 1,
@@ -6353,7 +6280,8 @@
                    'LOAD_FILTERS' => $VAR1->[1]{'CONFIG'}{'LOAD_FILTERS'}
                  }, 'Template::Context' ),
           bless( {
-                   'IMPL_Web_View_TTDocument_loader' => bless( {
+                   'IMPL_Web_View_TTRegistry_context' => $VAR1->[1],
+                   'IMPL_Web_View_TTRegistry_loader' => bless( {
                                                                  'IMPL_Web_View_TTLoader_context' => bless( {
                                                                                                               'PREFIX_MAP' => $VAR1->[1]{'PREFIX_MAP'},
                                                                                                               'BLOCKS' => $VAR1->[1]{'CONFIG'}{'BLOCKS'},
@@ -6389,164 +6317,9 @@
                                                                                                         'date' => $VAR1->[0]{'date'},
                                                                                                         'dynamic' => $VAR1->[0]{'dynamic'}
                                                                                                       },
-                                                                 'IMPL_Web_View_TTLoader_options' => $VAR1->[2]{'IMPL_Web_View_TTDocument_loader'}{'IMPL_Web_View_TTLoader_context'}{'CONFIG'},
+                                                                 'IMPL_Web_View_TTLoader_options' => $VAR1->[2]{'IMPL_Web_View_TTRegistry_loader'}{'IMPL_Web_View_TTLoader_context'}{'CONFIG'},
                                                                  'IMPL_Web_View_TTLoader_isInitialized' => 1
                                                                }, 'IMPL::Web::View::TTLoader' ),
-                   'IMPL_Web_View_TTControl_id' => '_14',
-                   'IMPL_Web_View_TTControl_template' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][2],
-                   'IMPL_Web_View_TTControl_context' => $VAR1->[1],
-                   'IMPL_Web_View_TTDocument_layout' => 'default',
-                   'IMPL_Web_View_TTControl_attributes' => {
-                                                             'childNodes' => [
-                                                                               bless( {
-                                                                                        'IMPL_Web_View_TTControl_id' => '_15',
-                                                                                        'IMPL_Web_View_TTControl_template' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][2],
-                                                                                        'IMPL_Web_View_TTControl_context' => bless( {
-                                                                                                                                      'PREFIX_MAP' => $VAR1->[1]{'PREFIX_MAP'},
-                                                                                                                                      'BLOCKS' => {
-                                                                                                                                                    'INIT' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][2]{'_DEFBLOCKS'}{'INIT'}
-                                                                                                                                                  },
-                                                                                                                                      'TRIM' => 0,
-                                                                                                                                      'CONFIG' => {
-                                                                                                                                                    'PREFIX_MAP' => $VAR1->[1]{'PREFIX_MAP'},
-                                                                                                                                                    'BLOCKS' => {
-                                                                                                                                                                  'INIT' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[2]{'_DEFBLOCKS'}{'INIT'}
-                                                                                                                                                                },
-                                                                                                                                                    'TRIM' => 0,
-                                                                                                                                                    'LOAD_PLUGINS' => $VAR1->[1]{'CONFIG'}{'LOAD_PLUGINS'},
-                                                                                                                                                    'LOAD_TEMPLATES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'},
-                                                                                                                                                    'BLKSTACK' => [],
-                                                                                                                                                    'STASH' => bless( {
-                                                                                                                                                                        'require' => sub { "DUMMY" },
-                                                                                                                                                                        'inc' => $VAR1->[0]{'inc'},
-                                                                                                                                                                        'date' => $VAR1->[0]{'date'},
-                                                                                                                                                                        'document' => $VAR1->[2],
-                                                                                                                                                                        'dec' => $VAR1->[0]{'dec'},
-                                                                                                                                                                        'dojoDefaultClass' => 'dijit.form.Input',
-                                                                                                                                                                        'dojo' => {
-                                                                                                                                                                                    'require' => [
-                                                                                                                                                                                                   'dijit.form.Input'
-                                                                                                                                                                                                 ]
-                                                                                                                                                                                  },
-                                                                                                                                                                        'view' => $VAR1->[0]{'view'},
-                                                                                                                                                                        'user' => 'test_user',
-                                                                                                                                                                        '_PARENT' => bless( {
-                                                                                                                                                                                              'require' => sub { "DUMMY" },
-                                                                                                                                                                                              'date' => $VAR1->[0]{'date'},
-                                                                                                                                                                                              'inc' => $VAR1->[0]{'inc'},
-                                                                                                                                                                                              'document' => $VAR1->[2],
-                                                                                                                                                                                              'dec' => $VAR1->[0]{'dec'},
-                                                                                                                                                                                              'dojoDefaultClass' => 'dijit.form.Input',
-                                                                                                                                                                                              'dojo' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'STASH'}{'dojo'},
-                                                                                                                                                                                              'view' => $VAR1->[0]{'view'},
-                                                                                                                                                                                              'user' => 'test_user',
-                                                                                                                                                                                              '_PARENT' => $VAR1->[0],
-                                                                                                                                                                                              'global' => $VAR1->[0]{'global'},
-                                                                                                                                                                                              'template' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][2],
-                                                                                                                                                                                              'dynamic' => $VAR1->[0]{'dynamic'},
-                                                                                                                                                                                              '_STRICT' => undef,
-                                                                                                                                                                                              'site' => $VAR1->[0]{'site'},
-                                                                                                                                                                                              'component' => '',
-                                                                                                                                                                                              '_DEBUG' => 0
-                                                                                                                                                                                            }, 'Template::Stash::XS' ),
-                                                                                                                                                                        'global' => $VAR1->[0]{'global'},
-                                                                                                                                                                        'template' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][4][4][2],
-                                                                                                                                                                        'dynamic' => $VAR1->[0]{'dynamic'},
-                                                                                                                                                                        '_STRICT' => undef,
-                                                                                                                                                                        'site' => $VAR1->[0]{'site'},
-                                                                                                                                                                        'component' => '',
-                                                                                                                                                                        '_DEBUG' => 0
-                                                                                                                                                                      }, 'Template::Stash::XS' ),
-                                                                                                                                                    '_ERROR' => '',
-                                                                                                                                                    'DEBUG_FORMAT' => undef,
-                                                                                                                                                    'DEBUG' => 0,
-                                                                                                                                                    'EVAL_PERL' => 0,
-                                                                                                                                                    'EXPOSE_BLOCKS' => 0,
-                                                                                                                                                    'DEBUG_DIRS' => 0,
-                                                                                                                                                    'RECURSION' => 0,
-                                                                                                                                                    'INIT_BLOCKS' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'BLOCKS'},
-                                                                                                                                                    'LOAD_FILTERS' => $VAR1->[1]{'CONFIG'}{'LOAD_FILTERS'}
-                                                                                                                                                  },
-                                                                                                                                      'LOAD_PLUGINS' => $VAR1->[1]{'CONFIG'}{'LOAD_PLUGINS'},
-                                                                                                                                      'LOAD_TEMPLATES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'},
-                                                                                                                                      'BLKSTACK' => [],
-                                                                                                                                      'STASH' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'STASH'},
-                                                                                                                                      'DEBUG_FORMAT' => undef,
-                                                                                                                                      '_ERROR' => '',
-                                                                                                                                      'DEBUG' => 0,
-                                                                                                                                      'EVAL_PERL' => 0,
-                                                                                                                                      'EXPOSE_BLOCKS' => 0,
-                                                                                                                                      'DEBUG_DIRS' => 0,
-                                                                                                                                      'RECURSION' => 0,
-                                                                                                                                      'INIT_BLOCKS' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'BLOCKS'},
-                                                                                                                                      'LOAD_FILTERS' => $VAR1->[1]{'CONFIG'}{'LOAD_FILTERS'}
-                                                                                                                                    }, 'Template::Context' ),
-                                                                                        'IMPL_Web_View_TTControl_attributes' => {
-                                                                                                                                  'factory' => bless( {
-                                                                                                                                                        'IMPL_Web_View_TTFactory_initialized' => 1,
-                                                                                                                                                        'IMPL_Web_View_TTFactory_registry' => bless( {
-                                                                                                                                                                                                       'IMPL_Web_View_TTRegistry_context' => undef,
-                                                                                                                                                                                                       'IMPL_Web_View_TTRegistry_loader' => undef,
-                                                                                                                                                                                                       'IMPL_Web_View_TTRegistry__cache' => undef
-                                                                                                                                                                                                     }, 'IMPL::Object::Disposed' ),
-                                                                                                                                                        'IMPL_Web_View_TTFactory_instances' => 1,
-                                                                                                                                                        'IMPL_Object_Factory_factory' => 'IMPL::Web::View::TTControl',
-                                                                                                                                                        'IMPL_Web_View_TTFactory_baseLocation' => 'My/Org',
-                                                                                                                                                        'IMPL_Web_View_TTFactory_context' => bless( {
-                                                                                                                                                                                                      'PREFIX_MAP' => $VAR1->[1]{'PREFIX_MAP'},
-                                                                                                                                                                                                      'BLOCKS' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'BLOCKS'},
-                                                                                                                                                                                                      'TRIM' => 0,
-                                                                                                                                                                                                      'CONFIG' => {
-                                                                                                                                                                                                                    'PREFIX_MAP' => $VAR1->[1]{'PREFIX_MAP'},
-                                                                                                                                                                                                                    'BLOCKS' => $VAR1->[1]{'BLOCKS'},
-                                                                                                                                                                                                                    'TRIM' => 0,
-                                                                                                                                                                                                                    'LOAD_PLUGINS' => $VAR1->[1]{'CONFIG'}{'LOAD_PLUGINS'},
-                                                                                                                                                                                                                    'LOAD_TEMPLATES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'},
-                                                                                                                                                                                                                    'BLKSTACK' => $VAR1->[1]{'BLKSTACK'},
-                                                                                                                                                                                                                    'STASH' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'STASH'}{'_PARENT'},
-                                                                                                                                                                                                                    '_ERROR' => '',
-                                                                                                                                                                                                                    'DEBUG_FORMAT' => undef,
-                                                                                                                                                                                                                    'DEBUG' => 0,
-                                                                                                                                                                                                                    'EVAL_PERL' => 0,
-                                                                                                                                                                                                                    'EXPOSE_BLOCKS' => 0,
-                                                                                                                                                                                                                    'DEBUG_DIRS' => 0,
-                                                                                                                                                                                                                    'RECURSION' => 0,
-                                                                                                                                                                                                                    'INIT_BLOCKS' => $VAR1->[1]{'BLOCKS'},
-                                                                                                                                                                                                                    'LOAD_FILTERS' => $VAR1->[1]{'CONFIG'}{'LOAD_FILTERS'}
-                                                                                                                                                                                                                  },
-                                                                                                                                                                                                      'LOAD_PLUGINS' => $VAR1->[1]{'CONFIG'}{'LOAD_PLUGINS'},
-                                                                                                                                                                                                      'LOAD_TEMPLATES' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'},
-                                                                                                                                                                                                      'BLKSTACK' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'BLKSTACK'},
-                                                                                                                                                                                                      'STASH' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'STASH'}{'_PARENT'},
-                                                                                                                                                                                                      'DEBUG_FORMAT' => undef,
-                                                                                                                                                                                                      '_ERROR' => '',
-                                                                                                                                                                                                      'DEBUG' => 0,
-                                                                                                                                                                                                      'EVAL_PERL' => 0,
-                                                                                                                                                                                                      'EXPOSE_BLOCKS' => 0,
-                                                                                                                                                                                                      'DEBUG_DIRS' => 0,
-                                                                                                                                                                                                      'RECURSION' => 0,
-                                                                                                                                                                                                      'INIT_BLOCKS' => $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'BLOCKS'},
-                                                                                                                                                                                                      'LOAD_FILTERS' => $VAR1->[1]{'CONFIG'}{'LOAD_FILTERS'}
-                                                                                                                                                                                                    }, 'Template::Context' ),
-                                                                                                                                                        'IMPL_Web_View_TTFactory_blocks' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][2]{'_DEFBLOCKS'},
-                                                                                                                                                        'IMPL_Web_View_TTFactory_template' => $VAR1->[1]{'CONFIG'}{'LOAD_TEMPLATES'}[0]{'HEAD'}[4][2]
-                                                                                                                                                      }, 'IMPL::Web::View::TTFactory' ),
-                                                                                                                                  'dojoClass' => 'dijit.form.Input',
-                                                                                                                                  'childNodes' => [],
-                                                                                                                                  'visualClass' => 'classic',
-                                                                                                                                  'data' => ''
-                                                                                                                                }
-                                                                                      }, 'IMPL::Web::View::TTControl' )
-                                                                             ],
-                                                             'title' => 'my document 2'
-                                                           }
-                 }, 'IMPL::Web::View::TTDocument' ),
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'STASH'}{'_PARENT'},
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_attributes'}{'factory'}{'IMPL_Web_View_TTFactory_context'},
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_attributes'}{'factory'}{'IMPL_Web_View_TTFactory_registry'},
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_attributes'}{'factory'},
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'}{'CONFIG'}{'STASH'},
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_context'},
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0],
-          $VAR1->[2]{'IMPL_Web_View_TTControl_attributes'}{'childNodes'}[0]{'IMPL_Web_View_TTControl_attributes'}{'factory'}{'IMPL_Web_View_TTFactory_registry'}
+                   'IMPL_Web_View_TTRegistry__cache' => {}
+                 }, 'IMPL::Web::View::TTRegistry' )
         ];