Bugzilla – Attachment 52258 Details for
Bug 16644
Plack: Use to_app to remove warning about Plack::App::CGIBin instance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16644: Plack: Use to_app to remove warning about Plack::App::CGIBin instance
Bug-16644-Plack-Use-toapp-to-remove-warning-about-.patch (text/plain), 2.03 KB, created by
Jonathan Druart
on 2016-06-11 14:19:50 UTC
(
hide
)
Description:
Bug 16644: Plack: Use to_app to remove warning about Plack::App::CGIBin instance
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-06-11 14:19:50 UTC
Size:
2.03 KB
patch
obsolete
>From ce97b1df0ffef719bc2491a4e684c9a1dc290223 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 3 Jun 2016 11:31:44 +0200 >Subject: [PATCH] Bug 16644: Plack: Use to_app to remove warning about > Plack::App::CGIBin instance > >Using Plack with the debian psgi file, I get lots of warnings like: >WARNING: Automatically converting Plack::App::CGIBin instance to a PSGI code reference. If you see this warning for each request, you probably need to explicitly call to_app() i.e. Plack::App::CGIBin->new(...)->to_app in your PSGI file. > >This patch is aimed to eliminate the warns. > >Test plan: >Run Plack with plack.psgi or koha.psgi and verify if you do not see these >warnings anymore. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > debian/templates/plack.psgi | 6 +++--- > misc/plack/koha.psgi | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/debian/templates/plack.psgi b/debian/templates/plack.psgi >index af95a5a..704b91b 100644 >--- a/debian/templates/plack.psgi >+++ b/debian/templates/plack.psgi >@@ -54,15 +54,15 @@ use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise > > my $intranet = Plack::App::CGIBin->new( > root => '/usr/share/koha/intranet/cgi-bin' >-); >+)->to_app; > > my $opac = Plack::App::CGIBin->new( > root => '/usr/share/koha/opac/cgi-bin/opac' >-); >+)->to_app; > > # my $api = Plack::App::CGIBin->new( > # root => '/usr/share/koha/api/' >-# ); >+# )->to_app; > > builder { > >diff --git a/misc/plack/koha.psgi b/misc/plack/koha.psgi >index 8a2ffd3..20c6ca8 100644 >--- a/misc/plack/koha.psgi >+++ b/misc/plack/koha.psgi >@@ -67,7 +67,7 @@ sub watch_for_size { > > my $CGI_ROOT = $ENV{INTRANET} ? $ENV{INTRANETDIR} : $ENV{OPACDIR}; > warn "# using Koha ", $ENV{INTRANET} ? 'intranet' : 'OPAC', " CGI from $CGI_ROOT\n"; >-my $app=Plack::App::CGIBin->new(root => $CGI_ROOT); >+my $app=Plack::App::CGIBin->new(root => $CGI_ROOT)->to_app; > my $home = sub { > return [ 302, [ Location => '/cgi-bin/koha/' . ( $ENV{INTRANET} ? 'mainpage.pl' : 'opac-main.pl' ) ] ]; > }; >-- >2.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16644
:
51979
|
52258
|
52725