Skip Menu |

This queue is for tickets about the Catalyst-Action-REST CPAN distribution.

Report information
The Basics
Id: 31027
Status: resolved
Priority: 0/
Queue: Catalyst-Action-REST

People
Owner: claco [...] cpan.org
Requestors: cedric [...] dreamgnu.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.50
Fixed in: (no value)



Subject: enabling end action suppresses output
I'm trying to convince Catalyst::Controller::REST and prototype 1.6.0 to work together. Just wanting to see the content of the response header I fiddled a little with the end action. like this sub end :Private { my ($self, $c) = @_; $c->log->debug('in end before'); $self->NEXT::end($c); $c->log->debug('in end after'); $c->log->debug('cont type' .$c->response->headers->content_type); $c->log->debug('cont type' .$c->response->output); } The problem is that it breaks everything and no output comes. If I just keep the method like sub end :Private { my ($self, $c) = @_; $self->NEXT::end($c); } It does not help. I don't think I do something bad (correct me pls if I do) I use X-Catalyst: 5.7006 attached perl -V
Subject: perl_config
Download perl_config
application/octet-stream 3k

Message body not shown because it is not plain text.

From: CLACO [...] cpan.org
On Wed Nov 28 05:28:58 2007, cedric@dreamgnu.com wrote: Show quoted text
> I'm trying to convince > Catalyst::Controller::REST > and prototype 1.6.0 > to work together. > > Just wanting to see the content of the response header I fiddled a > little with the end action. > like this > sub end :Private { > my ($self, $c) = @_; > $c->log->debug('in end before'); > $self->NEXT::end($c); > $c->log->debug('in end after'); > $c->log->debug('cont type' .$c->response->headers->content_type); > $c->log->debug('cont type' .$c->response->output); > } > > The problem is that it breaks everything and no output comes. > If I just keep the method like > sub end :Private { > my ($self, $c) = @_; > $self->NEXT::end($c); > } > > It does not help. I don't think I do something bad (correct me pls if
I do) Show quoted text
> I use > X-Catalyst: 5.7006 > > > attached perl -V >
You're adding an end that is marked as :Private. That means no action, specifically the REST action class is attached to the exposed end(). I'd wager if you change your end to this it would work: sub end : ActionClass('Serialize')
Resolved: No response from original poster, and I believe doing end : ActionClass("Serialize") instead of end : Private is normal behaviour.