Mercurial > pub > Impl
diff Lib/IMPL/Web/View/TTDocument.pm @ 291:5d14baa35790
*TTView: fixed template selectors mechanism
author | cin |
---|---|
date | Thu, 21 Feb 2013 03:44:02 +0400 |
parents | 7b0dad6117d5 |
children | 78f767765706 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/TTDocument.pm Wed Feb 20 17:24:57 2013 +0400 +++ b/Lib/IMPL/Web/View/TTDocument.pm Thu Feb 21 03:44:02 2013 +0400 @@ -54,7 +54,10 @@ $require = sub { my $control = shift; - carp("Cant load control $control outside the rendering procedure") unless $self; + unless($self) { + carp("Cant load control $control outside the rendering procedure"); + return; + } if (my $factory = $controls{$control}) { return $factory; @@ -89,8 +92,7 @@ $documentContext = _clone_context( $this->context ); $this->context->stash->set(require => $require); - $this->context->stash->set(document => sub { $self }); - + $this->context->stash->set(document => sub { $self }); my $text = eval {