Re: [Catalyst] prepare_body_chunk in Catalyst 5.9

2012-07-16 Thread Tomas Doran

On 12 Jul 2012, at 21:42, Eric Wright wrote:

 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. 

sigh

double sigh - I accidentally didn't send this - less relevant now..

bummer :(

I'm responsible for the changes in question, and what you are doing is an 
entirely valid use-csse.

To the wider community - is anyone else doing this?

To you, Eric - do you have any logistical or cultural problem moving this 
functionality to a custom request class/role (role recommended)?

As unless anyone disagrees (feel free if you think I'm wrong!), I think the 
change is actually good, and should stay (as only a very few people will be 
affected by it), but we should note it in Catalyst::Upgrading.

Cheers
t0m


___
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/


Re: [Catalyst] prepare_body_chunk in Catalyst 5.9

2012-07-16 Thread Eric Wright
Hi Tomas,

Nope. I don't have a problem with making the change. I like the idea using
the role applicator so I can keep things neatly packaged in a separate
plugin. (One of those cases where the Plugin approach makes sense since I
am very interested in the request/response lifecycle.)

I think adding some notes regarding the change to Catalyst::Upgrading is a
good idea. The POD for Catalyst::Engine should also probably add a note
explaining its removal or with a link to Catalyst::Upgrading.

Best,
Eric

On Mon, Jul 16, 2012 at 11:09 AM, Tomas Doran bobtf...@bobtfish.net wrote:


 On 12 Jul 2012, at 21:42, Eric Wright wrote:

  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.

 sigh

 double sigh - I accidentally didn't send this - less relevant now..

 bummer :(

 I'm responsible for the changes in question, and what you are doing is an
 entirely valid use-csse.

 To the wider community - is anyone else doing this?

 To you, Eric - do you have any logistical or cultural problem moving this
 functionality to a custom request class/role (role recommended)?

 As unless anyone disagrees (feel free if you think I'm wrong!), I think
 the change is actually good, and should stay (as only a very few people
 will be affected by it), but we should note it in Catalyst::Upgrading.

 Cheers
 t0m


 ___
 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/

___
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/


[Catalyst] prepare_body_chunk in Catalyst 5.9

2012-07-12 Thread Eric Wright
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' = sub {
my ( $orig, $c, $chunk ) = @_;
print STDERR AROUND prepare_body_chunk\n;
$c-$orig(@_);
};

before 'prepare_body_chunk' = sub {
  my ($self) = @_;
  print STDERR BEFORE prepare_body_chunk\n;
};

after 'prepare_body_chunk' = sub {
  my ($self) = @_;
  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
___
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/