[SCM] Debian packaging of libdevel-cycle-perl branch, master, updated. ea702ff17756f8b9d24b88e75de18373427d8ea5
Florian Schlichting
fschlich at zedat.fu-berlin.de
Wed Mar 21 22:27:07 UTC 2012
The following commit has been merged in the master branch:
commit 5b7ec4db0a6a45d3622d85d301fc63c956384f65
Author: Florian Schlichting <fschlich at zedat.fu-berlin.de>
Date: Wed Mar 21 23:11:14 2012 +0100
Added unhandled_type_REGEXP.patch (closes: #658614).
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c566a17
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+unhandled_type_REGEXP.patch
diff --git a/debian/patches/unhandled_type_REGEXP.patch b/debian/patches/unhandled_type_REGEXP.patch
new file mode 100644
index 0000000..e715b14
--- /dev/null
+++ b/debian/patches/unhandled_type_REGEXP.patch
@@ -0,0 +1,54 @@
+Description: Fix a warning and correctly check for regular expressions
+ Regular expressions have become first-class objects under Perl 5.12. This
+ patch restores the 5.10 behavior under 5.12, by having _get_type() return
+ 'SCALAR' when UNIVERSAL::isa($thingy,'Regexp') is true.
+Origin: other
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=56681
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658614
+
+--- a/t/Devel-Cycle.t
++++ b/t/Devel-Cycle.t
+@@ -5,7 +5,7 @@
+
+ # change 'tests => 1' to 'tests => last_test_to_print';
+
+-use Test::More tests => 12;
++use Test::More tests => 13;
+ use Scalar::Util qw(weaken isweak);
+ BEGIN { use_ok('Devel::Cycle') };
+
+@@ -87,6 +87,7 @@
+ }
+
+ {
++ no warnings qw{ once };
+ *FOOBAR = *FOOBAR if 0; # cease -w
+ my $test2 = { glob => \*FOOBAR };
+
+@@ -101,6 +102,15 @@
+ is("@warnings", "", "Warn only once");
+ }
+
++{
++ my $test_re = qr{foo}xms;
++
++ my @warnings;
++ local $SIG{__WARN__} = sub { push @warnings, @_ };
++ find_cycle($test_re);
++ ok( !@warnings, 'No warnings on Regex' );
++}
++
+ package foo;
+ use overload q("") => sub{ return 1 }; # show false alarm
+
+--- a/lib/Devel/Cycle.pm
++++ b/lib/Devel/Cycle.pm
+@@ -215,7 +215,7 @@
+ sub _get_type {
+ my $thingy = shift;
+ return unless ref $thingy;
+- return 'SCALAR' if UNIVERSAL::isa($thingy,'SCALAR') || UNIVERSAL::isa($thingy,'REF');
++ return 'SCALAR' if UNIVERSAL::isa($thingy,'SCALAR') || UNIVERSAL::isa($thingy,'REF') || UNIVERSAL::isa($thingy,'Regexp');
+ return 'ARRAY' if UNIVERSAL::isa($thingy,'ARRAY');
+ return 'HASH' if UNIVERSAL::isa($thingy,'HASH');
+ return 'CODE' if UNIVERSAL::isa($thingy,'CODE');
--
Debian packaging of libdevel-cycle-perl
More information about the Pkg-perl-cvs-commits
mailing list