diff Lib/IMPL/Web/View/TTFactory.pm @ 309:5e4e7c8fbca1

sync
author cin
date Fri, 19 Apr 2013 00:27:51 +0400
parents b5d5793f348e
children 75a78cbf7dcf
line wrap: on
line diff
--- 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 ) );