diff Lib/IMPL/Web/TT/Control.pm @ 117:0475eb382085

Controls support (RC1)
author wizard
date Thu, 03 Jun 2010 02:41:44 +0400
parents ddf0f037d460
children a7efb3117295
line wrap: on
line diff
--- a/Lib/IMPL/Web/TT/Control.pm	Mon May 31 08:30:39 2010 +0400
+++ b/Lib/IMPL/Web/TT/Control.pm	Thu Jun 03 02:41:44 2010 +0400
@@ -19,7 +19,7 @@
 	
 	if ($this->document) {
 		# load a template
-		#$args{template} = $this->document->context->template($args{template}) if ($args{template});
+		$args{template} = $this->document->context->template($args{template}) if ($args{template} and not ref $args{template});
 	}
 	$this->template($args{template}) if $args{template};
 
@@ -32,11 +32,11 @@
 	
 	if ($this->document) {
 		if ($this->template) {
-			return $this->document->context->include($this->template,{ this => $this });
+			return $this->document->context->include($this->template,{ this => $this }) ;
 		} elsif ($this->document->presenter) {
 			return $this->document->presenter->print($this);
 		} else {
-			return $this->toString();
+			return $this->toString().": ".$this->controlClass() . ": ".$this->path;
 		}
 	}
 }