[perl-POE-Component-Server-Bayeux] Patch for Switch.pm depreciation.
Yanko Kaneti
yaneti at fedoraproject.org
Wed Jul 20 07:12:29 UTC 2011
commit d25f8fa1bac654f856641174229946f6d5ae8a7b
Author: Yanko Kaneti <yaneti at declera.com>
Date: Wed Jul 20 10:12:11 2011 +0300
Patch for Switch.pm depreciation.
POE-Component-Server-Bayeux-0.04-switch.patch | 86 +++++++++++++++++++++++++
perl-POE-Component-Server-Bayeux.spec | 7 ++-
2 files changed, 92 insertions(+), 1 deletions(-)
---
diff --git a/POE-Component-Server-Bayeux-0.04-switch.patch b/POE-Component-Server-Bayeux-0.04-switch.patch
new file mode 100644
index 0000000..5bfba95
--- /dev/null
+++ b/POE-Component-Server-Bayeux-0.04-switch.patch
@@ -0,0 +1,86 @@
+diff -ur POE-Component-Server-Bayeux-0.04/lib/POE/Component/Server/Bayeux/Message/Meta.pm POE-Component-Server-Bayeux-0.04.switch/lib/POE/Component/Server/Bayeux/Message/Meta.pm
+--- POE-Component-Server-Bayeux-0.04/lib/POE/Component/Server/Bayeux/Message/Meta.pm 2009-12-16 17:11:45.000000000 +0200
++++ POE-Component-Server-Bayeux-0.04.switch/lib/POE/Component/Server/Bayeux/Message/Meta.pm 2011-07-20 10:07:37.570400958 +0300
+@@ -13,7 +13,7 @@
+ use strict;
+ use warnings;
+ use JSON::Any qw(XS);
+-use Switch;
++use feature "switch";
+ use Params::Validate qw(:types);
+ use base qw(POE::Component::Server::Bayeux::Message);
+
+@@ -101,8 +101,8 @@
+
+ my @responses;
+
+- switch ($self->type) {
+- case 'handshake' {
++ given ($self->type) {
++ when ("handshake") {
+ # Must ignore any other messages sent in this request
+ $self->request->clear_stack();
+
+@@ -121,7 +121,7 @@
+ successful => JSON::XS::false,
+ error => $self->is_error,
+ };
+- last;
++ break;
+ }
+
+ # TODO: Find a common connectionType
+@@ -150,7 +150,7 @@
+
+ push @responses, \%response;
+ }
+- case 'connect' {
++ when ("connect") {
+ my $client;
+ if (! $self->is_error) {
+ $client = $self->request->client($self->clientId);
+@@ -171,7 +171,7 @@
+ reconnect => 'handshake',
+ },
+ };
+- last;
++ break;
+ }
+
+ $client->flags->{is_polling} = $self->request->id;
+@@ -205,7 +205,7 @@
+
+ $self->request->delay(120) unless $no_delay;
+ }
+- case 'disconnect' {
++ when ("disconnect") {
+ my $client;
+ if (! $self->is_error) {
+ $client = $self->request->client($self->clientId);
+@@ -219,7 +219,7 @@
+ ($self->is_error ? ( error => $self->is_error ) : () ),
+ };
+ }
+- case 'subscribe' {
++ when ("subscribe") {
+ my $client;
+ if (! $self->is_error) {
+ $client = $self->request->client($self->clientId);
+@@ -233,7 +233,7 @@
+ clientId => $self->clientId,
+ subscription => $self->subscription,
+ };
+- last;
++ break;
+ }
+
+ push @responses, {
+@@ -247,7 +247,7 @@
+ $self->request->subscribe($client->id, $self->subscription);
+ }
+ }
+- case 'unsubscribe' {
++ when ("unsubscribe") {
+ my $client;
+ if (! $self->is_error) {
+ $client = $self->request->client($self->clientId);
diff --git a/perl-POE-Component-Server-Bayeux.spec b/perl-POE-Component-Server-Bayeux.spec
index 5aa6d43..f5f6b15 100644
--- a/perl-POE-Component-Server-Bayeux.spec
+++ b/perl-POE-Component-Server-Bayeux.spec
@@ -1,11 +1,12 @@
Name: perl-POE-Component-Server-Bayeux
Version: 0.04
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Bayeux/cometd server implementation in POE
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/POE-Component-Server-Bayeux/
Source0: http://search.cpan.org/CPAN/authors/id/E/EW/EWATERS/POE-Component-Server-Bayeux-%{version}.tar.gz
+Patch1: POE-Component-Server-Bayeux-0.04-switch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(CGI::Simple)
@@ -37,6 +38,7 @@ subscribe model.
%prep
%setup -q -n POE-Component-Server-Bayeux-%{version}
+%patch1 -p1 -b .switch
%build
%{__perl} Build.PL installdirs=vendor
@@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*
%changelog
+* Wed Jul 20 2011 Yanko Kaneti <yaneti at declera.com> - 0.04-6
+- Patch for Switch.pm depreciation.
+
* Wed Jul 20 2011 Petr Sabata <contyk at redhat.com> - 0.04-5
- Perl mass rebuild
More information about the scm-commits
mailing list