From: Tomas Doran Date: Tue, 16 Feb 2010 22:37:01 +0000 (+0000) Subject: Localise execeptions X-Git-Tag: v0.33^2~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-View-TT.git;a=commitdiff_plain;h=fc0ffed0b32adbce9cf3b5e70bfb8ea6548726d5 Localise execeptions --- diff --git a/lib/Catalyst/View/TT.pm b/lib/Catalyst/View/TT.pm index 1b561e2..0426b93 100644 --- a/lib/Catalyst/View/TT.pm +++ b/lib/Catalyst/View/TT.pm @@ -168,6 +168,7 @@ sub new { @{ $p->{copy_config} }; } } + local $@; eval "require $prov"; if(!$@) { push @providers, "$prov"->new($p->{args}); @@ -207,6 +208,7 @@ sub process { return 0; } + local $@; my $output = eval { $self->render($c, $template) }; if (my $err = $@) { my $error = qq/Couldn't render template "$template"/;