[Catalyst] RE: DBI handle without "magic" when calling with
dump_info=1 after updating Catalyst::Runtime
Jeremy Dack
chuggnut at chuggnut.co.uk
Tue Nov 23 14:15:49 GMT 2010
Matt,
I have multiple views in my view folder but I am not using them at present;
however just their presence seems to be enough to cause the resultset error.
I've found that adding:
$c->config->{'Action::RenderView'}->{ignore_classes} = [];
To my root sub end : ActionClass('RenderView') stops the error from
triggering. This seems to override it from ignoring the
DBIx::Class::ResultSource::Table & DBIx::Class::ResultSourceHandle as per
the RenderView.pm (see below).
$c->config->{'Action::RenderView'}->{ignore_classes} =
( ref($c->config->{'debug'}) eq 'HASH' ?
$c->config->{'debug'}->{ignore_classes} : undef )
|| [ qw/
DBIx::Class::ResultSource::Table
DBIx::Class::ResultSourceHandle
DateTime
/ ] unless exists
$c->config->{'Action::RenderView'}->{ignore_classes};
I have no idea why this fixes the issue as I have only just started playing
with Catalyst so I maybe talking rubbish however it has definitely solved my
issues.
Good luck
Jeremy.
-----Original Message-----
From: Matthias Dietrich [mailto:mdietrich at cpan.org]
Sent: 23 November 2010 13:19
To: Jeremy Dack
Cc: The elegant MVC web framework
Subject: Re: DBI handle without "magic" when calling with dump_info=1 after
updating Catalyst::Runtime
Hi Jeremy,
I cc'ed the list again so they all can see that we discuss about this :-).
Am 23.11.2010 um 14:13 schrieb Jeremy Dack:
> The problem seems to be with RenderView, do you use any custom views like
> JSON or is all your output HTML?
I use some other views than HTML in some apps, but this issue only occurs
when HTML (here: Mason) should be printed. AFAIK it also occurs when only a
HTML/Mason view is available.
Matt
--
rainboxx Software Engineering
Matthias Dietrich
rainboxx Matthias Dietrich | Phone: +49 7141 / 2 39 14 71
Königsallee 43 | Fax : +49 3222 / 1 47 63 00
71638 Ludwigsburg | Mobil: +49 151 / 50 60 78 64
| WWW : http://www.rainboxx.de
CPAN: http://search.cpan.org/~mdietrich/
XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html
More information about the Catalyst
mailing list