[SCM] Debian packaging of libpetal-perl branch, master, updated. 5e86d1ec8c24dfb263310e3b946bf594dd0adca6
Damyan Ivanov
dmn at debian.org
Sun Aug 14 07:09:17 UTC 2011
The following commit has been merged in the master branch:
commit 5e86d1ec8c24dfb263310e3b946bf594dd0adca6
Author: Damyan Ivanov <dmn at debian.org>
Date: Sun Aug 14 10:03:56 2011 +0300
Import a patch from Stefan Seifert (nine_AT_detonation_DOT_org) replacing UNIVERSAL usage.
diff --git a/debian/changelog b/debian/changelog
index a049709..4781a52 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ libpetal-perl (2.19-2) UNRELEASED; urgency=low
[ Damyan Ivanov ]
* Use source format '3.0 (quilt)'
+ * Import a patch from Stefan Seifert (nine_AT_detonation_DOT_org) replacing
+ UNIVERSAL usage.
-- gregor herrmann <gregoa at debian.org> Sun, 16 Nov 2008 20:46:05 +0100
diff --git a/debian/patches/no-UNIVERSAL-import.patch b/debian/patches/no-UNIVERSAL-import.patch
new file mode 100644
index 0000000..0abf738
--- /dev/null
+++ b/debian/patches/no-UNIVERSAL-import.patch
@@ -0,0 +1,72 @@
+Description: UNIVERSAL::isa and ::import are deprecated with perl 5.12
+ Replace their usafe with $class->isa and Scalar::Util::reftype
+Author: Stefan Seifert (nine_AT_detonation_DOT_org)
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=57787
+Bug-Debian: http://bugs.debian.org/582805
+
+--- a/lib/Petal/Hash/Var.pm
++++ b/lib/Petal/Hash/Var.pm
+@@ -11,8 +11,7 @@
+ use warnings;
+
+ use Carp;
+-use UNIVERSAL qw( isa );
+-use Scalar::Util qw( blessed );
++use Scalar::Util qw( blessed reftype );
+
+
+ our $STRING_RE_DOUBLE = qr/(?<!\\)\".*?(?<!\\)\"/;
+@@ -78,7 +77,7 @@
+ if (blessed $current)
+ {
+ ACCESS_OBJECT:
+- goto ACCESS_HASH if (isa ($current, 'Petal::Hash'));
++ goto ACCESS_HASH if ($current->isa('Petal::Hash'));
+
+ if ($current->can ($next) or $current->can ('AUTOLOAD'))
+ {
+@@ -87,23 +86,23 @@
+ }
+ else
+ {
+- goto ACCESS_HASH if (isa ($current, 'HASH'));
+- goto ACCESS_ARRAY if (isa ($current, 'ARRAY'));
++ goto ACCESS_HASH if ((reftype($current) or '') eq 'HASH');
++ goto ACCESS_ARRAY if ((reftype($current) or '') eq 'ARRAY');
+ confess "Cannot invoke '$next' on '" . ref($current) .
+ "' object at '$current_path' - no such method (near $argument)";
+ }
+ }
+- elsif (isa ($current, 'HASH'))
++ elsif (ref($current) eq 'HASH')
+ {
+ ACCESS_HASH:
+- unless (isa $current->{$next}, 'CODE')
++ unless (ref($current->{$next}) eq 'CODE')
+ {
+ confess "Cannot access hash at '$current_path' with parameters (near $argument)"
+ if ($has_args and not $has_path_tokens);
+ }
+ $current = $current->{$next};
+ }
+- elsif (isa ($current, 'ARRAY'))
++ elsif (ref($current) eq 'ARRAY')
+ {
+ ACCESS_ARRAY:
+ # it might be an array, then the key has to be numerical...
+@@ -130,13 +129,13 @@
+ return '';
+ }
+
+- $current = (isa ($current, 'CODE')) ? $current->(@args) : $current;
++ $current = (ref($current) eq 'CODE') ? $current->(@args) : $current;
+ $current_path .= "/$next";
+ }
+
+ # return '' unless (defined $current);
+ # $current = "$current" if (defined $current);
+- return $$current if isa($current, 'SCALAR');
++ return $$current if ref($current) eq 'SCALAR';
+ return $current;
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9d8690c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+no-UNIVERSAL-import.patch
--
Debian packaging of libpetal-perl
More information about the Pkg-perl-cvs-commits
mailing list