[libemail-sender-perl] 01/01: Avoid warning in Email::Sender::Transport::SMTP when parsing the version of Net::SMTP

Damyan Ivanov dmn at moszumanska.debian.org
Fri Dec 16 10:02:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libemail-sender-perl.

commit 2f8217c249f28bda8e0f39e89e2e14dffe3d0896
Author: Damyan Ivanov <dmn at debian.org>
Date:   Fri Dec 16 10:02:12 2016 +0000

    Avoid warning in Email::Sender::Transport::SMTP when parsing the version of Net::SMTP
    
    Closes: #847219
---
 debian/patches/net-smtp-version-cmp.patch | 31 +++++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/net-smtp-version-cmp.patch b/debian/patches/net-smtp-version-cmp.patch
new file mode 100644
index 0000000..71a4cd1
--- /dev/null
+++ b/debian/patches/net-smtp-version-cmp.patch
@@ -0,0 +1,31 @@
+Description: use version->parse for parsing NET::SMTP's version
+ The current version of Net::SMTP in Debian is 3.08_01, which causes a warning
+ in Email::Sender::Transport::SMTP:
+ .
+  Argument "3.08_01" isn't numeric in numeric lt (<) at
+  /usr/share/perl5/Email/Sender/Transport/SMTP.pm line 266.
+Bug-Debian: https://bugs.debian.org/847219
+Author: Damyan Ivanov <dmn at debian.org>
+Forwarded: https://github.com/rjbs/Email-Sender/issues/46
+Bug: https://github.com/rjbs/Email-Sender/issues/46
+
+--- a/lib/Email/Sender/Transport/SMTP.pm
++++ b/lib/Email/Sender/Transport/SMTP.pm
+@@ -11,6 +11,7 @@ use MooX::Types::MooseLike::Base qw(Bool
+ use Net::SMTP 3.07; # SSL support, fixed datasend
+ 
+ use utf8 (); # See below. -- rjbs, 2015-05-14
++use version ();
+ 
+ #pod =head1 DESCRIPTION
+ #pod
+@@ -263,7 +264,8 @@ sub send_email {
+     # the mock from ->new.  We don't want to create a new SMTP just to get the
+     # version, and we can't rely on $smtp being a Net::SMTP object.
+     # -- rjbs, 2015-08-10
+-    utf8::downgrade($next_hunk) if (Net::SMTP->VERSION || 0) < 3.07;
++    utf8::downgrade($next_hunk)
++        if version->parse( Net::SMTP->VERSION || 0 ) < 3.07;
+ 
+     $smtp->datasend($next_hunk) or $FAULT->("error at during DATA");
+   }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4382bad
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+net-smtp-version-cmp.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libemail-sender-perl.git



More information about the Pkg-perl-cvs-commits mailing list