Skip to content

Improved documentation for psgi_app#8

Open
MaxPerl wants to merge 3 commits intoMartinMcGrath:masterfrom
MaxPerl:docs-for-psgi_app
Open

Improved documentation for psgi_app#8
MaxPerl wants to merge 3 commits intoMartinMcGrath:masterfrom
MaxPerl:docs-for-psgi_app

Conversation

@MaxPerl
Copy link
Copy Markdown

@MaxPerl MaxPerl commented Jun 8, 2019

See #7

@MaxPerl MaxPerl marked this pull request as ready for review June 8, 2019 21:46
Comment thread lib/CGI/Application.pm
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.
Copy link
Copy Markdown

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.

Comment thread lib/CGI/Application.pm
package main;

my $app = WebApp->psgi_app();

Copy link
Copy Markdown

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