Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved documentation for psgi_app #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MaxPerl
Copy link

@MaxPerl MaxPerl commented Jun 8, 2019

See #7

@MaxPerl MaxPerl marked this pull request as ready for review June 8, 2019 21:46
object, construct your own object using C<< run_as_psgi() >>, as shown below.
object, you have to construct your own object using C<< run_as_psgi() >>,
as shown below, because C<< psgi_app >> creates a new CGI::PSGI object
unconditionally on every request and therefore overrides a own query object.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial version looked better IMHO. The only thing that should be added/highlighted is that QUERY parameter is not supported and will be overwritten.

I would even add a warning / exception in the code if we detect that it was passed.

package main;

my $app = WebApp->psgi_app();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that there's a need for this example here. The example I was talking about at #7 was essentially the one above: line
$psgi_coderef = WebApp->psgi_app({ ... args to new() ... }); - should be changed to something like
$psgi_coderef = WebApp->psgi_app({ ... args to new() without QUERY... }); - that's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants