[libencode-arabic-perl] 01/10: Add patch to work with newer versions of Encode by using Import::Into.

gregor herrmann gregoa at debian.org
Wed Jul 30 18:17:58 UTC 2014


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

gregoa pushed a commit to branch master
in repository libencode-arabic-perl.

commit 48e06b003b9a992583ef19c953e9a0a949f0bf25
Author: gregor herrmann <gregoa at debian.org>
Date:   Wed Jul 30 20:07:08 2014 +0200

    Add patch to work with newer versions of Encode by using Import::Into.
    
    Thanks: Niko Tyni for coming up with this patch.
    Closes: #752928
---
 ...-compatibility-with-newer-Encode-versions.patch | 187 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 188 insertions(+)

diff --git a/debian/patches/0001-Fix-compatibility-with-newer-Encode-versions.patch b/debian/patches/0001-Fix-compatibility-with-newer-Encode-versions.patch
new file mode 100644
index 0000000..e4fd94d
--- /dev/null
+++ b/debian/patches/0001-Fix-compatibility-with-newer-Encode-versions.patch
@@ -0,0 +1,187 @@
+Description: Fix compatibility with newer Encode versions
+ As of Encode 2.55 (commit
+  https://github.com/dankogai/p5-encode/commit/93b3d593d85004c570e44f3f79db0ca3c08d89ea
+ ) Encode doesn't inherit from Exporter anymore, so
+ Encode->export_to_level() fails.
+ .
+ Replace the export_to_level() calls with Import::Into.
+Origin: vendor
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=95975
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=95975
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752928
+Author: Niko Tyni <ntyni at debian.org>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-07-30
+
+--- a/lib/Encode/Arabic.pm
++++ b/lib/Encode/Arabic.pm
+@@ -8,6 +8,7 @@
+ 
+ our $VERSION = '1.9' || do { q $Revision: 808 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
+ 
++use Import::Into;
+ 
+ sub import {            # perform import as if Encode were used one level before this module
+ 
+@@ -25,7 +26,8 @@
+ 
+     require Encode;
+ 
+-    Encode->export_to_level(1, @_);
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/ArabTeX.pm
++++ b/lib/Encode/Arabic/ArabTeX.pm
+@@ -14,6 +14,8 @@
+ use Scalar::Util 'blessed';
+ use Carp;
+ 
++use Import::Into;
++
+ our $VERSION = do { q $Revision: 717 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
+ 
+ 
+@@ -107,7 +109,8 @@
+ 
+     require Encode;
+ 
+-    Encode->export_to_level(1, @_);     # here comes the only trick ^^
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);     # here comes the only trick ^^
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/ArabTeX/RE.pm
++++ b/lib/Encode/Arabic/ArabTeX/RE.pm
+@@ -12,6 +12,7 @@
+ use warnings;
+ 
+ use Scalar::Util 'blessed';
++use Import::Into;
+ 
+ our $VERSION = do { q $Revision: 162 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
+ 
+@@ -49,7 +50,8 @@
+ 
+ sub import {            # perform import as if Encode were used one level before this module
+     require Encode;
+-    Encode->export_to_level(1, @_);
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/ArabTeX/Verbatim.pm
++++ b/lib/Encode/Arabic/ArabTeX/Verbatim.pm
+@@ -18,6 +18,7 @@
+ 
+ use Encode::Arabic::ArabTeX ();
+ use base 'Encode::Arabic::ArabTeX';
++use Import::Into;
+ 
+ 
+ use Encode::Encoding;
+@@ -110,7 +111,8 @@
+ 
+     require Encode;
+ 
+-    Encode->export_to_level(1, @_);     # here comes the only trick ^^
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);     # here comes the only trick ^^
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/ArabTeX/ZDMG.pm
++++ b/lib/Encode/Arabic/ArabTeX/ZDMG.pm
+@@ -79,7 +79,8 @@
+ 
+     require Encode;
+ 
+-    Encode->export_to_level(1, @_);     # here comes the only trick ^^
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);     # here comes the only trick ^^
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/ArabTeX/ZDMG/RE.pm
++++ b/lib/Encode/Arabic/ArabTeX/ZDMG/RE.pm
+@@ -10,13 +10,15 @@
+ 
+ use strict;
+ use warnings;
++use Import::Into;
+ 
+ our $VERSION = do { q $Revision: 143 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
+ 
+ 
+ sub import {            # perform import as if Encode were used one level before this module
+     require Encode;
+-    Encode->export_to_level(1, @_);
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/Buckwalter.pm
++++ b/lib/Encode/Arabic/Buckwalter.pm
+@@ -12,6 +12,7 @@
+ use warnings;
+ 
+ use Scalar::Util 'blessed';
++use Import::Into;
+ 
+ our $VERSION = do { q $Revision: 179 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
+ 
+@@ -66,7 +67,8 @@
+ 
+     require Encode;
+ 
+-    Encode->export_to_level(1, @_);
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);
+ }
+ 
+ 
+--- a/lib/Encode/Arabic/Parkinson.pm
++++ b/lib/Encode/Arabic/Parkinson.pm
+@@ -12,6 +12,7 @@
+ use warnings;
+ 
+ use Scalar::Util 'blessed';
++use Import::Into;
+ 
+ our $VERSION = do { q $Revision: 179 $ =~ /(\d+)/; sprintf "%4.2f", $1 / 100 };
+ 
+@@ -66,7 +67,8 @@
+ 
+     require Encode;
+ 
+-    Encode->export_to_level(1, @_);
++    shift @_; # no need for the package name
++    Encode->import::into(1, @_);
+ }
+ 
+ 
+--- a/Build.PL
++++ b/Build.PL
+@@ -10,6 +10,7 @@
+     dist_version_from   => 'lib/Encode/Arabic.pm',
+     requires       => {
+                            'perl'           => 5.008,
++                           'Import::Into'   => 0,
+                       },
+     build_requires => {
+                            'Test::More'     => 0,
+--- a/META.yml
++++ b/META.yml
+@@ -9,6 +9,7 @@
+   license: http://dev.perl.org/licenses/
+ requires:
+   perl: 5.008
++  Import::Into: 0
+ build_requires:
+   Test::More: 0
+ provides:
diff --git a/debian/patches/series b/debian/patches/series
index 8d4da6e..39320e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 typos.diff
+0001-Fix-compatibility-with-newer-Encode-versions.patch

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



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