[libnet-upnp-perl] 10/13: describe and forward method-name-spelling.patch
Damyan Ivanov
dmn at moszumanska.debian.org
Sat Nov 4 08:50:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
dmn pushed a commit to branch master
in repository libnet-upnp-perl.
commit 3a707d9b94f8169e367c1ed81faf29cdbcffae3a
Author: Damyan Ivanov <dmn at debian.org>
Date: Sat Nov 4 08:48:02 2017 +0000
describe and forward method-name-spelling.patch
---
debian/patches/method-name-spelling.patch | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/debian/patches/method-name-spelling.patch b/debian/patches/method-name-spelling.patch
index 26bb62b..4c6d74b 100644
--- a/debian/patches/method-name-spelling.patch
+++ b/debian/patches/method-name-spelling.patch
@@ -1,3 +1,12 @@
+Description: spelling mistake in gettotalbytesrecieved method name
+ It should be "gettotalbytesreceived".
+ The patch fixes that, keeping compatibility with existing usage by
+ defining an alias with the incorrect name.
+ .
+ A test is added ensuring that both the old and the fixed method names
+ are available.
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=123509
+Bug: https://rt.cpan.org/Ticket/Display.html?id=123509
--- a/lib/Net/UPnP/GW/Gateway.pm
+++ b/lib/Net/UPnP/GW/Gateway.pm
@@ -252,10 +252,12 @@ sub deleteportmapping {
@@ -8,7 +17,7 @@
+# gettotalbytesreceived
#------------------------------
+# back-compatibility
-+{ no refs; *gettotalbytesrecieved = \&gettotalbytesreceived; }
++{ no strict 'refs'; *Net::UPnP::GW::Gateway::gettotalbytesrecieved = \&gettotalbytesreceived; }
-sub gettotalbytesrecieved {
+sub gettotalbytesreceived {
@@ -27,3 +36,22 @@
Get the total received bytes.
+--- a/t/UPnP.t
++++ b/t/UPnP.t
+@@ -5,8 +5,14 @@
+
+ # change 'tests => 1' to 'tests => last_test_to_print';
+
+-use Test::More tests => 1;
+-BEGIN { use_ok('Net::UPnP') };
++use Test::More tests => 4;
++BEGIN { use_ok('Net::UPnP'); use_ok('Net::UPnP::GW::Gateway'); };
++
++ok( Net::UPnP::GW::Gateway->can('gettotalbytesrecieved'),
++ 'Gateway can "gettotalbytesrecieved"' );
++
++ok( Net::UPnP::GW::Gateway->can('gettotalbytesreceived'),
++ 'Gateway can "gettotalbytesreceived"' );
+
+ #########################
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-upnp-perl.git
More information about the Pkg-perl-cvs-commits
mailing list