[perl-Catalyst-Plugin-SubRequest] Add patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 58d9e6bfe6573d7d9992463b9d5b2e7a4dfb5810
Author: Emmanuel Seyman <emmanuel@xxxxxxxxx>
Date:   Wed Dec 10 20:14:01 2014 +0100

    Add patch

 Catalyst-Plugin-SubRequest-5.9.patch |   40 ++++++++++++++++++++++++++++++++++
 perl-Catalyst-Plugin-SubRequest.spec |    5 +++-
 2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/Catalyst-Plugin-SubRequest-5.9.patch b/Catalyst-Plugin-SubRequest-5.9.patch
new file mode 100644
index 0000000..dae91c9
--- /dev/null
+++ b/Catalyst-Plugin-SubRequest-5.9.patch
@@ -0,0 +1,40 @@
+Description: compatibility with Catalyst 5.9
+ Taken from https://gist.github.com/jjn1056/9947765
+Author: John Napiorkowski
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=94392
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747502
+
+--- a/lib/Catalyst/Plugin/SubRequest.pm
++++ b/lib/Catalyst/Plugin/SubRequest.pm
+@@ -102,18 +102,29 @@ sub sub_request_response {
+ 
+   # need this so that
+   my $writer = Catalyst::Plugin::SubRequest::Writer->new;
+-  my $response_cb = sub { $writer };
++  my $response_cb = sub {
++    my $response = shift;
++    my ($status, $headers, $body) = @$response;
++    if($body) {
++      return;
++    } else {
++      return $writer;
++    }
++  };
++
+   my $i_ctx = $class->prepare( env => $env, response_cb => $response_cb );
+   $i_ctx->stash($stash);
+   $i_ctx->dispatch;
+   $i_ctx->finalize;
+   $c->stats->profile( end => 'subrequest: ' . $path ) if $c->debug;
+ 
+-  $i_ctx->response->body($writer->body);
++  if($writer->_is_closed) {
++    $i_ctx->response->body($writer->body);
++  }
+ 
+   return $i_ctx->response;
+ }
+ 
+ package Catalyst::Plugin::SubRequest::Writer;
+ use Moose;
+ has body => (
diff --git a/perl-Catalyst-Plugin-SubRequest.spec b/perl-Catalyst-Plugin-SubRequest.spec
index 7b380d5..4642a71 100644
--- a/perl-Catalyst-Plugin-SubRequest.spec
+++ b/perl-Catalyst-Plugin-SubRequest.spec
@@ -1,7 +1,7 @@
 Name:           perl-Catalyst-Plugin-SubRequest
 Summary:        Make subrequests to actions in Catalyst
 Version:        0.20
-Release:        7%{?dist}
+Release:        8%{?dist}
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 Source0:        http://search.cpan.org/CPAN/authors/id/E/ED/EDENC/Catalyst-Plugin-SubRequest-%{version}.tar.gz
@@ -54,6 +54,9 @@ TEST_POD=1 make test
 %{_mandir}/man3/Catalyst*
 
 %changelog
+* Wed Dec 10 2014 Emmanuel Seyman <emmanuel@xxxxxxxxx> - 0.20-8
+- Bump to rebuild
+
 * Wed Dec 10 2014 Emmanuel Seyman <emmanuel@xxxxxxxxx> - 0.20-7
 - Apply Debian patch to make tests pass (#1172196)
 - Run all tests
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux