Hi!
Sorry about this newbie question. I've honestly and desperatly googled a
lot, but still have no idea how to properly call process() method from
my view, inherited from Catalyst::View::JSON
Any advices are welcome!
I have a view in my project. It's created with a helper in a standard
manner.
package my_app::View::JSON;
use strict;
use base 'Catalyst::View::JSON';
1;
From my app I do following
$c->stash->{id} = 777;
$c->forward('View::JSON'); # It's not my default view
It works flawlessy, but I need to preprocess my stash to exclude or
include some data or set additional headers. It's a pretty standard
logic, so I decided to create my own process method in my view, process
my stash and then pass control to the inherited process method
# My
sub process
{
my($self, $c) = @_;
$self->Catalyst::View::JSON::process($self, $c);
}
is not working.
|Caught exception in my_app::View::JSON->process "Can't locate object
method "stash" via package "my_app::View::JSON"|
I intuitively understand why (at least about $self), but don't know how
to make magic in a propper way
Many thank in advance!
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/