Your message dated Sun, 01 Aug 2010 21:19:01 +0000
with message-id <[email protected]>
and subject line Bug#584943: fixed in libparse-debianchangelog-perl 1.1.1-2.1
has caused the Debian Bug report #584943,
regarding libparse-debianchangelog-perl: parse method dies in for loops
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
584943: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584943
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libparse-debianchangelog-perl
Version: 1.1.1-2
Severity: normal
Hi,
Parse::DebianChangelog's parse method dies in for loops like:
for ("") { $foo->parse; }
but not in
for my $x ("") { $foo->parse; }
The first patch in the attached series localizes $_ to avoid this
problem. See also [1] for more information.
[1] http://www.perlmonks.org/?node_id=570712
I also attached a test case and updated the dependencies to include a
recent version of Test::More and Test::Exception.
Regards,
Ansgar
PS: The Git repository seems outdated. 1.1.1-2 is not there :(
>From cacc780bc2daceecff08e797485d45c3fb4ff638 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <[email protected]>
Date: Tue, 8 Jun 2010 02:11:37 +0900
Subject: [PATCH 1/3] localize $_ to make parse method usable in for loops
---
lib/Parse/DebianChangelog.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/Parse/DebianChangelog.pm b/lib/Parse/DebianChangelog.pm
index 30186de..d801f53 100644
--- a/lib/Parse/DebianChangelog.pm
+++ b/lib/Parse/DebianChangelog.pm
@@ -309,6 +309,7 @@ sub parse {
my $blanklines = 0;
my $unknowncounter = 1; # to make version unique, e.g. for using as id
+ local $_;
while (<$fh>) {
s/\s*\n$//;
# printf(STDERR "%-39.39s %-39.39s\n",$expect,$_);
--
1.7.1
>From 543507c4cbcd38cec8af521e93e24cb94ef8f960 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <[email protected]>
Date: Tue, 8 Jun 2010 02:12:22 +0900
Subject: [PATCH 2/3] add test case for parsing in for loop
---
t/parse-in-for-loop.t | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
create mode 100644 t/parse-in-for-loop.t
diff --git a/t/parse-in-for-loop.t b/t/parse-in-for-loop.t
new file mode 100644
index 0000000..ce21298
--- /dev/null
+++ b/t/parse-in-for-loop.t
@@ -0,0 +1,33 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More 0.88;
+use Test::Exception;
+
+use Parse::DebianChangelog;
+
+my $data = <<'EOT';
+package (1.2-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Ex A. Mple <[email protected]> Tue, 08 Jun 2010 01:50:16 +0900
+EOT
+
+{
+ my $parser = Parse::DebianChangelog->init;
+ for my $x ("") {
+ lives_ok { $parser->parse({ instring => $data }); } 'parse in for my $x
(...) works';
+ }
+}
+
+{
+ my $parser = Parse::DebianChangelog->init;
+ for ("") {
+ lives_ok { $parser->parse({ instring => $data }); } 'parse in for (...)
works';
+ }
+}
+
+done_testing;
--
1.7.1
>From 23d7f7567e2331a5761cf31cccf9e38262c3cd4b Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <[email protected]>
Date: Tue, 8 Jun 2010 02:16:05 +0900
Subject: [PATCH 3/3] add build-dependencies for new tests
---
debian/control | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/debian/control b/debian/control
index 6330d7c..2bc0c0d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: libparse-debianchangelog-perl
Section: perl
Priority: optional
Build-Depends: debhelper (>= 5)
-Build-Depends-Indep: perl (>= 5.8.0-7), po4a, libtimedate-perl,
libhtml-parser-perl, libhtml-template-perl, libclass-accessor-perl, tidy,
libxml-simple-perl, libio-string-perl, libmodule-build-perl, libtest-pod-perl,
libtest-pod-coverage-perl
+Build-Depends-Indep: perl (>= 5.8.0-7), po4a, libtimedate-perl,
libhtml-parser-perl, libhtml-template-perl, libclass-accessor-perl, tidy,
libxml-simple-perl, libio-string-perl, libmodule-build-perl, libtest-pod-perl,
libtest-pod-coverage-perl, perl (>= 5.10.1) | libtest-simple-perl (>= 0.88),
libtest-exception-perl
Maintainer: Frank Lichtenheld <[email protected]>
Standards-Version: 3.7.2
XS-Vcs-git: git://source.djpig.de/git/Parse-DebianChangelog.git
--
1.7.1
--- End Message ---
--- Begin Message ---
Source: libparse-debianchangelog-perl
Source-Version: 1.1.1-2.1
We believe that the bug you reported is fixed in the latest version of
libparse-debianchangelog-perl, which is due to be installed in the Debian FTP
archive:
libparse-debianchangelog-perl_1.1.1-2.1.diff.gz
to
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.1.1-2.1.diff.gz
libparse-debianchangelog-perl_1.1.1-2.1.dsc
to
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.1.1-2.1.dsc
libparse-debianchangelog-perl_1.1.1-2.1_all.deb
to
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.1.1-2.1_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ansgar Burchardt <[email protected]> (supplier of updated
libparse-debianchangelog-perl package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Fri, 30 Jul 2010 19:01:12 +0900
Source: libparse-debianchangelog-perl
Binary: libparse-debianchangelog-perl
Architecture: source all
Version: 1.1.1-2.1
Distribution: unstable
Urgency: low
Maintainer: Frank Lichtenheld <[email protected]>
Changed-By: Ansgar Burchardt <[email protected]>
Description:
libparse-debianchangelog-perl - parse Debian changelogs and output them in
other formats
Closes: 560634 584943
Changes:
libparse-debianchangelog-perl (1.1.1-2.1) unstable; urgency=low
.
* Non-maintainer upload.
* Filter duplicate bug numbers in Closes field. (Closes: #560634)
* Localize $_ in for loop. (Closes: #584943)
- Add build-dep on perl (>= 5.10.1) | libtest-simple-perl (>= 0.88)
and libtest-exception-perl for new test.
Checksums-Sha1:
5dbe82030c2b4a67ff16fa0f4475703c71e05b9b 2247
libparse-debianchangelog-perl_1.1.1-2.1.dsc
20f76f233b93adfc309652997208621d30a61adf 4221
libparse-debianchangelog-perl_1.1.1-2.1.diff.gz
042f89d105cf7930157d245b27dfd735d08c6c7a 60524
libparse-debianchangelog-perl_1.1.1-2.1_all.deb
Checksums-Sha256:
8ae01c39db1f3652c76920ef82b3e088cb56ef898c6691e61dc2525dabcdb5d8 2247
libparse-debianchangelog-perl_1.1.1-2.1.dsc
83f09fe209b1a66dd4dbb36b4fbf8bfe1e5c3a56c03e2792c389c75d7f6d8b2d 4221
libparse-debianchangelog-perl_1.1.1-2.1.diff.gz
3cdda185e631b0e54ef297d4a0ac9ccf2e76005f20bb4126307c8b4577b5dd19 60524
libparse-debianchangelog-perl_1.1.1-2.1_all.deb
Files:
cd650827656a1575bd7da0a0c8b6d175 2247 perl optional
libparse-debianchangelog-perl_1.1.1-2.1.dsc
baa0ac840b73e602db66394f0bc85140 4221 perl optional
libparse-debianchangelog-perl_1.1.1-2.1.diff.gz
c6a4ebcea7f796b5c046b1c8a2fe7775 60524 perl optional
libparse-debianchangelog-perl_1.1.1-2.1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQIcBAEBCAAGBQJMUzyRAAoJELs6aAGGSaoG5t8P/19R73r8pyeh5368vSlzZaFI
1N2ucDPubC/AOGsLFQGJ78Ydvel1UARWilEbT66kjgIvMYVK4dPJraKXZSLU2ep0
d35/E0YeBTMZcQVDCstJspP2D2NG3zv+sBeozNlHgUNDwOE3D2P1pcEXl4OXiNC5
pFqFrAjZ/OLyiSgaBKrcUyMVMMr7V34w/0f1cu+J04QxbfI/XDLHKxHmk1HEJU6r
+3U1Yv104PArGGE3OHsdFgTodHJee/xCzbQvtOgR7GsHVfmMy95yMvvBx901WAVW
hSSNIOX4eEBlY5umTZqwefgK+dCvOI88vocRFC4SiB6XAVaBVZQ+MVTjQQLdpWn2
9RnIZicU5ulTBgFu2mV6EZFDapBv+Rn3v5HB8JBY1XTKzTWaBYPrAifXX+WEvNaH
mETSHgw14ppVxQfOKA5OLCAr6KGXLEFkvVRP5MympCXQ2jom4ED+C2wSu5Uaa5At
IK1hOmKMBAWyI3B8CUinJRXlh9C5NnToZwASprnVOH10TQSjwmKrd5DkeBfQtaz3
7mBF07B6LVsyqcBFPCtoZT7p3RryQwwIDNObrEETwinbBuaISjTYH8bf+7d5/FUR
Yf2Vrb7j9VSC5udSkXKr/BdlXv6TbeVVQJXb98Q7yes83QkmC1qYvUJKdUpqs3dY
zE7I2YmFBzgpCv/cyZ4T
=F1yx
-----END PGP SIGNATURE-----
--- End Message ---