Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Plack CPAN distribution.

Report information
The Basics
Id: 61363
Status: rejected
Priority: 0/
Queue: Plack

Owner: Nobody in particular
Requestors: TIMB [...]

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

Subject: Return value of test_psgi should be clarified
Download (untitled) / with headers
text/plain 673b
The Plack::Test docs don't specify what test_psgi returns. From inspecting the code (incl ::MockHTTP) it returns the return value of the callback (including passing through the context). That's very handy! It enables the tests to be moved outside the callback. In my test script I now define a utility wrapper like this: sub make_psgi_req { my ($req) = @_; return test_psgi $app, sub { shift->($req) } # returns HTTP::Response object } and do tests like this: $resp = make_psgi_req( HTTP::Request->new(GET => "...") ); ... tests on $resp go here ... Thanks great, but I'm nervous of building on an undocumented aspect of the API. p.s. Thanks for PSGI/Plack!
Download (untitled) / with headers
text/plain 106b
Right, but i guess that only works with the MockHTTP case and not the Server implementation, doesn't it?
won't fix

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to