fixes due to new Mojo::Renderer error handling, tests

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
This commit is contained in:
vti
2008-11-11 23:53:28 -08:00
committed by Ask Bjørn Hansen
parent 9dce1eb021
commit 68783f08e2
5 changed files with 35 additions and 7 deletions
+5 -7
View File
@@ -44,20 +44,18 @@ sub _init {
}
sub _render {
my ($self, $mojo, $tx, $path, $args) = @_;
my ($self, $mojo, $path, $output, $tx, $args) = @_;
$args ||= {};
#use Data::Dump qw(dump);
#warn dump(\$args);
my $output;
unless ($self->tt->process($path, {%$args, tx => $tx}, \$output, {binmode => ":utf8"})) {
unless ($self->tt->process($path, {%$args, tx => $tx}, $output, {binmode => ":utf8"})) {
Carp::carp $self->tt->error . "\n";
return $self->tt->error;
}
else {
return $output;
return 0;
} else {
return 1;
}
}