[Catalyst] Caught exception "Can't use string ("Admin::V::TT") as
aHASH ref while "strict refs" in use
at/usr/lib/perl5/site_perl/5.8.0/Class/Accessor/Fast.pm line 38."
Alan Humphrey
alan.humphrey at comcast.net
Mon Jun 6 16:14:59 CEST 2005
I use Catalyst::View::Mason for my view class so things aren't exactly the
same, but I've seen this error when I've failed to define the template name
in my controller. Do you have a line like:
$c->stash->{template} = 'template_to_display';
in your controller?
- Alan
-----Original Message-----
From: catalyst-bounces at lists.rawmode.org
[mailto:catalyst-bounces at lists.rawmode.org] On Behalf Of Srinivasa Mullangi
Sent: Sunday, June 05, 2005 10:32 PM
To: catalyst at lists.rawmode.org
Subject: [Catalyst] Caught exception "Can't use string ("Admin::V::TT") as
aHASH ref while "strict refs" in use
at/usr/lib/perl5/site_perl/5.8.0/Class/Accessor/Fast.pm line 38."
My apache conf is:
<Location /admin>
SetHandler perl-script
PerlHandler BettyMills::Admin
</Location>
I am using apache Apache/1.3.29 (Unix) mod_perl/1.29 mod_ssl/2.8.16
OpenSSL/0.9.7d
Here is the code for Admin::V::TT is my view component
package Admin::V::TT;
use strict;
use base 'Catalyst::View::TT';
use HTML::Entities;
sub new {
my $self = shift;
$self->config->{WRAPPER} = 'template/wrapper';
$self->config->{COMPILE_DIR} = 'ttc';
$self->config->{FILTERS} = {html_entity =>
\&Admin::V::TT::html_encode_entities},
return $self->SUPER::new(@_);
}
sub html_encode_entities {
return HTML::Entities::encode_entities($_[0], "\200-\377");
}
1;
I developed this application using HTTP server that comes with Catalyst.
Now I am moving this application to apache/modperl environment and got into
this error.
What is going wrong and how to fix it.
Thanks a lot
Srini
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050606/fb52f58e/attachment.htm
More information about the Catalyst
mailing list