Subject: | PATCH: Failure with TT Exceptions |
Hello,
When using CGI::Application::Plugin::DebugScreen with
CGI::Application::Plugin::TT, if the template does not exist, TT will
throw an exception object. This exception object is implemented as a
blessed array, which causes problems with DebugScreen, specifically the
HTML::Template that it uses. The error that is generated is:
HTML::Template::param() : attempt to set parameter 'desc' with an array
ref - parameter is not a TMPL_LOOP! at
/usr/lib/perl5/site_perl/5.8.5//CGI/Application/Plugin/DebugScreen.pm line
218
I have attached a simple patch which forces the exception to be stringified.
Regards,
Bradley C Bailey
Subject: | stringify-exception.patch |
--- DebugScreen.pm.orig 2008-01-23 14:09:33.000000000 -0700
+++ DebugScreen.pm 2008-01-23 14:09:46.000000000 -0700
@@ -174,7 +174,7 @@
sub debug_report{
my $self = shift;
- my $desc = shift;
+ my $desc = "" . shift;
my $url = $self->query->url(-path_info=>1,-query=>1);
my $title = ref $self || $self;