This is an automated email from the git hooks/post-receive script. intrigeri pushed a commit to branch master in repository libparse-debianchangelog-perl.
commit 0a9ed2281c355b39b62a0b9fcb6e4cb99b49f38f Author: Ansgar Burchardt <[email protected]> Date: Sun Feb 20 00:25:09 2011 +0100 Import Debian release 1.1.1-2.1 * 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. --- debian/changelog | 10 ++++++++++ debian/control | 2 +- lib/Parse/DebianChangelog.pm | 7 ++++--- t/parse-in-for-loop.t | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6eb7aee..5909e95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +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. + + -- Ansgar Burchardt <[email protected]> Fri, 30 Jul 2010 19:01:12 +0900 + libparse-debianchangelog-perl (1.1.1-2) unstable; urgency=low * Add liblocale-gettext-perl to Build-Depends-Indep: Fix FTBFS (LP: diff --git a/debian/control b/debian/control index 1212b07..02e20e2 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, liblocale-gettext-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, liblocale-gettext-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.3 Vcs-git: git://source.djpig.de/git/Parse-DebianChangelog.git diff --git a/lib/Parse/DebianChangelog.pm b/lib/Parse/DebianChangelog.pm index 30186de..494b760 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,$_); @@ -709,7 +710,7 @@ sub dpkg { } $f{Changes} = get_dpkg_changes( $data->[0] ); - $f{Closes} = [ @{$data->[0]{Closes}} ]; + my %closes = map { $_ => 1 } @{$data->[0]{Closes}}; my $first = 1; my $urg_comment = ''; foreach my $entry (@$data) { @@ -723,10 +724,10 @@ sub dpkg { $urg_comment .= $entry->{Urgency_Comment}; $f{Changes} .= "\n .".get_dpkg_changes( $entry ); - push @{$f{Closes}}, @{$entry->{Closes}}; + $closes{ $_ } = 1 for @{$entry->{Closes}}; } - $f{Closes} = join " ", sort { $a <=> $b } @{$f{Closes}}; + $f{Closes} = join " ", sort { $a <=> $b } keys %closes; $f{Urgency} .= $urg_comment; return %f if wantarray; 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; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libparse-debianchangelog-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
