Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread Toby Corkindale
On 1 November 2013 12:29, Kieren Diment wrote: > On 01/11/2013, at 12:26 PM, Toby Corkindale wrote: >> On 1 November 2013 12:01, Kieren Diment wrote: >>> You mean you want two apps interacting with each other in the same script >>> using WWW::MEchanize? Eden and I were working some docs up on t

Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread Kieren Diment
On 01/11/2013, at 12:26 PM, Toby Corkindale wrote: > On 1 November 2013 12:01, Kieren Diment wrote: >> You mean you want two apps interacting with each other in the same script >> using WWW::MEchanize? Eden and I were working some docs up on that topic >> until real life intervened. >> >> T

Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread Toby Corkindale
On 1 November 2013 12:01, Kieren Diment wrote: > You mean you want two apps interacting with each other in the same script > using WWW::MEchanize? Eden and I were working some docs up on that topic > until real life intervened. > > This was the start of it: > > http://paste.scsys.co.uk/273844

Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread Toby Corkindale
It looks like there is an undocumented feature in Catalyst::Test, a callback to let you modify the request. $args->{mangle_request}->($request) if $args->{mangle_request}; Or alternatively I can subclass the module and extend _customize_request() to add more to the PSGI environment. On 1 Nove

Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread Kieren Diment
You mean you want two apps interacting with each other in the same script using WWW::MEchanize? Eden and I were working some docs up on that topic until real life intervened. This was the start of it: http://paste.scsys.co.uk/273844 On 01/11/2013, at 11:39 AM, Toby Corkindale wrote: > Umm, n

Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread Toby Corkindale
Umm, not that I know of. I suppose another way to phrase the question is: Is there a way to manipulate the $c->engine->env in the Catalyst application, from within unit tests neatly? On 1 November 2013 08:35, John Napiorkowski wrote: > Not sure what you mean, is there an example in another frame

Re: [Catalyst] Re: Response traits.

2013-10-31 Thread Bill Moseley
On Thu, Oct 31, 2013 at 2:34 PM, John Napiorkowski wrote: > I'm currently recommending people take advantage of native PSGI support in > the newer Catalyst and use Middleware for when you need to munge and or > alter the response (if its being done globally). The interface is more > straightforwa

Re: [Catalyst] Have exceeded the maximum number of attempts (1000) to open temp file/dir

2013-10-31 Thread Bill Moseley
On Thu, Oct 31, 2013 at 2:44 PM, John Napiorkowski wrote: > > am calling ->cleanup(1) when we create the HTTP::Body. is that not enough > to cleanup tmp files ? > I haven't look at this in a while, but I think it's described here: https://rt.cpan.org/Public/Bug/Display.html?id=84004 HTTP::Body

[Catalyst] One more thing on the state of Async IO on Catalyst Dev5

2013-10-31 Thread John Napiorkowski
One thing that was noted in the changlog is we have added experimental support of IO:Async based event loops, to compliment Anyevent.  The Async examples on github have been updated to include a IOAsync version of the streaming, web socket echo and web socket chat examples. Async IO support in

[Catalyst] Development 5 Release of Catalyst 'Hamburg' on CPAN

2013-10-31 Thread John Napiorkowski
Hey All, Catalyst 5.90049_005 is on CPAN, please check it out! This is the fifth and likely last development release of Catalyst in this current series.  Assuming no serious problems show up on CPAN testers, and nobody shouts out, I will make this as stable sometime in the next few days. In ge

Re: [Catalyst] Have exceeded the maximum number of attempts (1000) to open temp file/dir

2013-10-31 Thread John Napiorkowski
Bill, I see over here (latest release) https://metacpan.org/source/JJNAPIORK/Catalyst-Runtime-5.90049_005/lib/Catalyst/Request.pm#L260 am calling ->cleanup(1) when we create the HTTP::Body.  is that not enough to cleanup tmp files ? regarding the tmp file thing, wow I have no idea, but I hope

Re: [Catalyst] Mocking PSGI layers in Test WWW Mechanize Catalyst

2013-10-31 Thread John Napiorkowski
Not sure what you mean, is there an example in another framework you can point to? johnn On Thursday, October 31, 2013 12:55 AM, Toby Corkindale wrote: Hi, I wondered if there's any prior art around on inserting (mocked) PSGI layers into Test::WWW::Mechanize:Catalyst? Cheers, Toby -- Tur

Re: [Catalyst] Re: Response traits.

2013-10-31 Thread John Napiorkowski
I'm currently recommending people take advantage of native PSGI support in the newer Catalyst and use Middleware for when you need to munge and or alter the response (if its being done globally).  The interface is more straightforward. johnn On Thursday, October 31, 2013 11:33 AM, Bill Mosele

Re: [Catalyst] $c->write() buffering?

2013-10-31 Thread John Napiorkowski
Recent releases of Catalyst makes it possible to stream write, although you need to be careful when using a blocking web server (long stream will of course block the available listener). Older versions of Catalyst had similar ability with the write method, I never used it, and would be happen t

Re: [Catalyst] $c->write() buffering?

2013-10-31 Thread John Napiorkowski
Also, check out  https://github.com/jjn1056/Perl-Catalyst-AsyncExample which has a few examples related.  Those are more about async IO but the approach is the same, just more simple since you don't need to run a lot of callbacks. Basically post PSGI Catalyst returns a deferred response to th

Re: [Catalyst] $c->write() buffering?

2013-10-31 Thread Daniel J. Luke
I replicated this today outside of Catalyst (just a small FCGI/FCGI::ProcManager test script). If anyone else has seen this/fixed it, I'd appreciate a pointer. I'll report back to the list if/when I get it resolved so that there's an answer in the list archives for future people to google other

Re: [Catalyst] Re: Response traits.

2013-10-31 Thread Bill Moseley
On Thu, Oct 31, 2013 at 12:51 AM, Aristotle Pagaltzis wrote: > CatalystX::RoleApplicator Thanks. That was what I was looking for. Just missed it when looking. -- Bill Moseley mose...@hank.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://

Re: [Catalyst] $c->write() buffering?

2013-10-31 Thread Daniel J. Luke
We're actually running Catalyst::Runtime 5.80031 (currently), so I believe it's using Catalyst::Engine::FastCGI which just does *STDOUT->syswrite() I guess I try to do some testing with newer Catalyst (and maybe alternate deployment methods), to see if that changes anything. Looking through the

[Catalyst] Re: Response traits.

2013-10-31 Thread Aristotle Pagaltzis
* Bill Moseley [2013-10-31 00:40]: > What is the recommended way to apply a Response trait? Uhm, how about applying it to your response class? CatalystX::RoleApplicator I guess? Not sure I get the question though. -- Aristotle Pagaltzis // __