Mercurial > pub > Impl
comparison Lib/IMPL/Web/View/TTControl.pm @ 185:ae8072f2f2a3
IMPL::Web::View::TTDocument tests, fixes
| author | cin |
|---|---|
| date | Thu, 29 Mar 2012 18:22:15 +0400 |
| parents | 47dac58691ee |
| children | 6c0fee769b0c |
comparison
equal
deleted
inserted
replaced
| 184:7525ea9a071a | 185:ae8072f2f2a3 |
|---|---|
| 45 | 45 |
| 46 if(my $body = $this->template->blocks->{RENDER} ) { | 46 if(my $body = $this->template->blocks->{RENDER} ) { |
| 47 return $this->context->process( $body, { this => $this } ); | 47 return $this->context->process( $body, { this => $this } ); |
| 48 } else { | 48 } else { |
| 49 return ""; | 49 return ""; |
| 50 } | 50 } |
| 51 } | |
| 52 | |
| 53 sub AUTOLOAD { | |
| 54 our $AUTOLOAD; | |
| 55 | |
| 56 my $method = ($AUTOLOAD =~ m/(\w+)$/)[0]; | |
| 57 | |
| 58 return if $method eq 'DESTROY'; | |
| 59 | |
| 60 my $res = $_[0]->template->$method(); | |
| 61 | |
| 62 return defined($res) ? $res : $_[0]->context->stash->get($method); | |
| 51 | 63 |
| 52 } | 64 } |
| 53 | 65 |
| 54 1; | 66 1; |
| 55 | 67 |
