[Catalyst] Re: prepare_body_chunk in Catalyst 5.9

Eric Wright ewright at linescale.com
Thu Jul 12 20:42:01 GMT 2012

Looking into this further - in the the source for Catalyst I see that the
prepare_body statement has been moved to the Request object removing the
ability to hook into this event via the Plugin architecture. I was using
this hook to monitor the number of chunks transmitted to the server for
monitoring upload progress. I take it this approach is not going to be
supported any longer? From a design perspective, would it be recommended
that I instead extend and implement my own Request class for this purpose?
Appreciate the feedback.

On Thu, Jul 12, 2012 at 1:26 PM, Eric Wright <ewright at linescale.com> wrote:

> Has something changed in Catalyst 5.9 with regards to prepare_body_chunk?
> I had some dependent Plugin code that is no longer working.
> None of the following method modifiers are triggered:
> around 'prepare_body_chunk' =3D> sub {
>     my ( $orig, $c, $chunk ) =3D @_;
>     print STDERR "AROUND prepare_body_chunk\n";
>     $c->$orig(@_);
> };
> before 'prepare_body_chunk' =3D> sub {
>   my ($self) =3D @_;
>   print STDERR "BEFORE prepare_body_chunk\n";
> };
> after 'prepare_body_chunk' =3D> sub {
>   my ($self) =3D @_;
>   print STDERR "AFTER prepare_body_chunk\n";
> };
> I am able to hook into other parts of the Catalyst lifecycle like
> "prepare_body" and "dispatch". Am I overlooking something obvious here?
> Any idea what could be wrong?
> -Eric

-- =

Eric Wright
Linescale, Inc.
ewright at linescale.com
203.572.1750 <http://www.linescale.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120712/f54cb=

More information about the Catalyst mailing list