Package: pperl
Version: 0.25-5
Severity: important
User: [email protected]
Usertags: perl-5.12-transition
This package fails to build on amd64 with perl_5.12.0-2 from experimental:
# Test 6 got: "Use of \"goto\" to jump into a construct is deprecated at
/home/niko/tmp/tt/pperl-0.25/sockets/pperlNrZKqj line 53.\n" (t/06exit_die.t at
line 18)
# Expected: ""
# t/06exit_die.t line 18 is: ok($out, "");
# Test 8 got: "foo at t/spammy.plx line 7.\nUse of \"goto\" to jump into a
construct is deprecated at /home/niko/tmp/tt/pperl-0.25/sockets/pperlNrZKqj
line 53.\n" (t/06exit_die.t at line 22)
# Expected: "foo at t/spammy.plx line 7.\n"
# t/06exit_die.t line 22 is: ok($out, "foo at t/spammy.plx line 7.\n");
t/06exit_die.t .......
Failed 2/8 subtests
[...]
Test Summary Report
-------------------
t/06exit_die.t (Wstat: 0 Tests: 8 Failed: 2)
Failed tests: 6, 8
t/09taint.t (Wstat: 0 Tests: 1 Failed: 1)
Failed test: 1
t/10tie.t (Wstat: 0 Tests: 10 Failed: 10)
Failed tests: 1-10
Files=21, Tests=294, 10 wallclock secs ( 0.12 usr 0.02 sys + 2.42 cusr
0.36 csys = 2.92 CPU)
Result: FAIL
Failed 3/21 test programs. 13/294 subtests failed.
The attached patch works around this by disabling the new deprecation message.
The package builds fine for me with this.
Obviously this is just a bandaid and the real fix is to restructure the code.
Hope it helps a bit, at least it points out the problem locations.
--
Niko Tyni [email protected]
>From c963b08dcbe1c15fc30cee7494b68cd82c45a8f5 Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Wed, 12 May 2010 21:45:01 +0300
Subject: [PATCH] Disable deprecation warnings as a workaround for test failures on Perl 5.12.0
The test suite fails with Perl 5.12.0 due to new deprecation messages:
# Test 6 got: "Use of \"goto\" to jump into a construct is deprecated at /home/niko/tmp/tt/pperl-0.25/sockets/pperlNrZKqj line 53.\n" (t/06exit_die.t at line 18)
Fixing these requires code restructuring, but a temporary workaround
is to disable the messages for now.
---
pperl.h.header | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/pperl.h.header b/pperl.h.header
index fce0573..492f775 100644
--- a/pperl.h.header
+++ b/pperl.h.header
@@ -49,7 +49,9 @@ BEGIN {
exit($retval);
}
$exit_code = $retval;
+{ no warnings 'deprecated';
goto __PPerl_exit;
+}
};
*CORE::GLOBAL::fork = sub {
@@ -74,7 +76,9 @@ BEGIN {
}
my $code = system(@_);
$exit_code = $code >> 8;
+{ no warnings 'deprecated';
goto __PPerl_exit;
+}
};
}
@@ -506,7 +510,9 @@ eval {
#### Your Code Here ####
};
+{ no warnings 'deprecated';
goto ____PPerlBackAgain;
+}
BEGIN {
log_error("finding open filehandles ($PPERL::NO_CLEANUP)\n");
--
1.7.1