Your message dated Mon, 04 Apr 2011 18:05:33 +0000
with message-id <[email protected]>
and subject line Bug#515018: fixed in libparse-debianchangelog-perl 1.2.0-1
has caused the Debian Bug report #515018,
regarding please stay away from $&, $', $` and their use English equivalent
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.)


-- 
515018: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=515018
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libparse-debianchangelog-perl
Version: 1.1.1-2
Severity: important

Hi Frank,

Could you please modify the library so that it doesn't use any of the magic 
vars mentioned in the subject?

Attached diff replaces all the uses of $&; I also tried to replace the use of 
$POSTMATCH but  somehow broke the whole thing.

The following links contain more information on the subject:
* http://search.cpan.org/dist/Devel-SawAmpersand/lib/Devel/SawAmpersand.pm
* perlre
* http://perl.apache.org/docs/1.0/guide/performance.html#Avoid_the_Evil_Troika

Since Parse::DebianChangelog is used by many scripts, including lintian, it 
would be great if you could fix this ASAP (and probably provide a backport so 
that lenny users take advantage of a faster lintian).

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net
diff --git a/lib/Parse/DebianChangelog/ChangesFilters.pm b/lib/Parse/DebianChangelog/ChangesFilters.pm
index 8434770..af5268f 100644
--- a/lib/Parse/DebianChangelog/ChangesFilters.pm
+++ b/lib/Parse/DebianChangelog/ChangesFilters.pm
@@ -70,11 +70,11 @@ sub http_ftp_urls {
     $text=~ s|&lt;URL:([-\w\.\/:~_\@]+):([a-zA-Z0-9\'() ]+)&gt;
         |$cgi->a({ -href=>$1 }, $2)
 	|xego;
-    $text=~ s|https?:[\w/\.:\@+\-~\%\#?=&;,]+[\w/]
-	|$cgi->a({ -href=>$& }, $&)
+    $text=~ s|(https?:[\w/\.:\@+\-~\%\#?=&;,]+[\w/])
+	|$cgi->a({ -href=>$1 }, $1)
 	|xego;
-    $text=~ s|ftp:[\w/\.:\@+\-~\%\#?=&;,]+[\w/]
-	|$cgi->a({ -href=>$& }, $&)
+    $text=~ s|(ftp:[\w/\.:\@+\-~\%\#?=&;,]+[\w/])
+	|$cgi->a({ -href=>$1 }, $1)
 	|xego;
 
     return $text;
@@ -83,15 +83,15 @@ sub http_ftp_urls {
 sub email_to_ddpo {
     my ($text, $cgi) = @_;
 
-    $text =~ s|[a-zA-Z0-9_\+\-\.]+\@([a-zA-Z0-9][\w\.+\-]+\.[a-zA-Z]{2,})
-	|$cgi->a({ -href=>"http://qa.debian.org/developer.php?login=$&"; }, $&)
+    $text =~ s|([a-zA-Z0-9_\+\-\.]+\@([a-zA-Z0-9][\w\.+\-]+\.[a-zA-Z]{2,}))
+	|$cgi->a({ -href=>"http://qa.debian.org/developer.php?login=$1"; }, $1)
 	|xego;
     return $text;
 }
 
 sub bugs_to_bts {
-    (my $text = $_[0]) =~ s|Closes:\s*(?:Bug)?\#\d+(?:\s*,\s*(?:Bug)?\#\d+)*
-	|my $tmp = $&; { no warnings;
+    (my $text = $_[0]) =~ s|(Closes:\s*(?:Bug)?\#\d+(?:\s*,\s*(?:Bug)?\#\d+)*)
+	|my $tmp = $1; { no warnings;
 			 $tmp =~ s@(Bug)?\#(\d+)@<a class="buglink" href="http://bugs.debian.org/$2";>$1\#$2</a>@ig; }
     "$tmp"
 	|xiego;
@@ -101,8 +101,8 @@ sub bugs_to_bts {
 sub cve_to_mitre {
     my ($text, $cgi) = @_;
 
-    $text =~ s!\b(?:CVE|CAN)-\d{4}-\d{4}\b
-        !$cgi->a({ -href=>"http://cve.mitre.org/cgi-bin/cvename.cgi?name=$&"; }, $&)
+    $text =~ s!(\b(?:CVE|CAN)-\d{4}-\d{4}\b)
+        !$cgi->a({ -href=>"http://cve.mitre.org/cgi-bin/cvename.cgi?name=$1"; }, $1)
 	!xego;
     return $text;
 }
@@ -129,17 +129,17 @@ sub pseudo_markup {
 sub common_licenses {
     my ($text, $cgi) = @_;
 
-    $text=~ s|/usr/share/common-licenses/GPL(?:-2)?
-	|$cgi->a({ -href=>"http://www.gnu.org/copyleft/gpl.html"; }, $&)
+    $text=~ s|(/usr/share/common-licenses/GPL(?:-2)?)
+	|$cgi->a({ -href=>"http://www.gnu.org/copyleft/gpl.html"; }, $1)
 	|xego;
-    $text=~ s|/usr/share/common-licenses/LGPL(?:-2(?:\.1)?)?
-	|$cgi->a({ -href=>"http://www.gnu.org/copyleft/lgpl.html"; }, $&)
+    $text=~ s|(/usr/share/common-licenses/LGPL(?:-2(?:\.1)?)?)
+	|$cgi->a({ -href=>"http://www.gnu.org/copyleft/lgpl.html"; }, $1)
 	|xego;
-    $text=~ s|/usr/share/common-licenses/Artistic
-	|$cgi->a({ -href=>"http://www.opensource.org/licenses/artistic-license.php"; }, $&)
+    $text=~ s|(/usr/share/common-licenses/Artistic)
+	|$cgi->a({ -href=>"http://www.opensource.org/licenses/artistic-license.php"; }, $1)
 	|xego;
-    $text=~ s|/usr/share/common-licenses/BSD
-	|$cgi->a({ -href=>"http://www.debian.org/misc/bsd.license"; }, $&)
+    $text=~ s|(/usr/share/common-licenses/BSD)
+	|$cgi->a({ -href=>"http://www.debian.org/misc/bsd.license"; }, $1)
 	|xego;
 
     return $text;
diff --git a/lib/Parse/DebianChangelog/Util.pm b/lib/Parse/DebianChangelog/Util.pm
index 9086249..2c74d4a 100644
--- a/lib/Parse/DebianChangelog/Util.pm
+++ b/lib/Parse/DebianChangelog/Util.pm
@@ -67,8 +67,8 @@ sub find_closes {
     my $changes = shift;
     my @closes = ();
 
-    while ($changes && ($changes =~ /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/ig)) {
-	push(@closes, $& =~ /\#?\s?(\d+)/g);
+    while ($changes && ($changes =~ /(closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*)/ig)) {
+	push(@closes, $1 =~ /\#?\s?(\d+)/g);
     }
 
     @closes = sort { $a <=> $b } @closes;

--- End Message ---
--- Begin Message ---
Source: libparse-debianchangelog-perl
Source-Version: 1.2.0-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.2.0-1.debian.tar.gz
  to 
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.2.0-1.debian.tar.gz
libparse-debianchangelog-perl_1.2.0-1.dsc
  to 
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.2.0-1.dsc
libparse-debianchangelog-perl_1.2.0-1_all.deb
  to 
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.2.0-1_all.deb
libparse-debianchangelog-perl_1.2.0.orig.tar.gz
  to 
main/libp/libparse-debianchangelog-perl/libparse-debianchangelog-perl_1.2.0.orig.tar.gz



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.
Frank Lichtenheld <[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: SHA1

Format: 1.8
Date: Sun, 03 Apr 2011 23:25:41 +0200
Source: libparse-debianchangelog-perl
Binary: libparse-debianchangelog-perl
Architecture: source all
Version: 1.2.0-1
Distribution: unstable
Urgency: low
Maintainer: Frank Lichtenheld <[email protected]>
Changed-By: Frank Lichtenheld <[email protected]>
Description: 
 libparse-debianchangelog-perl - parse Debian changelogs and output them in 
other formats
Closes: 446798 515018 565238 603341 605820
Changes: 
 libparse-debianchangelog-perl (1.2.0-1) unstable; urgency=low
 .
   * New upstream release:
     - Don't use $& or $` (Closes: #515018)
     - Allow '.' and '+' in distribution names. Patch by John Wright.
       (Closes: #565238)
     - Add Danish translation of bin.pot by Joe Dalton (Closes: #605820)
     - ChangesFilters:
       + Fix conversion of <http://something/> (Closes: #603341)
       + Allow to omit # before closed bug numbers (Closes: 446798 ;)
   * Bump Standards-Version to 3.9.1 (no changes)
   * Convert debian/rules to debhelper 7
Checksums-Sha1: 
 b566c46305fbba6ec571b3c5fc2d889df03567f5 1609 
libparse-debianchangelog-perl_1.2.0-1.dsc
 491dbce7a32af5d4bf3c4737973f35343a09c3cd 109582 
libparse-debianchangelog-perl_1.2.0.orig.tar.gz
 9266528c38c783a07b2f6a36c791c68ca0a281bb 2751 
libparse-debianchangelog-perl_1.2.0-1.debian.tar.gz
 ae3dd52f898950ab10b49e602c9801c54965b5d2 62312 
libparse-debianchangelog-perl_1.2.0-1_all.deb
Checksums-Sha256: 
 c1a92810abc0e9dad0a8637aa6c3901c247dc32fd7b6d54899460035cd81f284 1609 
libparse-debianchangelog-perl_1.2.0-1.dsc
 7d002d7e049c1fb336a4b3f22637b26adeba8870ab3ddd6542a07a593bc837c5 109582 
libparse-debianchangelog-perl_1.2.0.orig.tar.gz
 3999007248c8df5e2949ed9d5109e01c2f7dbd2cab1d47c3069d78e9b9cc2f0c 2751 
libparse-debianchangelog-perl_1.2.0-1.debian.tar.gz
 82213751aa3c55140f3c32d92a2b25f2a6acb878492dcec0dc06f7a8b1a845f1 62312 
libparse-debianchangelog-perl_1.2.0-1_all.deb
Files: 
 b5e05eae9165afbcaa422b2a0e90a45d 1609 perl optional 
libparse-debianchangelog-perl_1.2.0-1.dsc
 fa6099f0d15b27b6eee7c535f2d3ce78 109582 perl optional 
libparse-debianchangelog-perl_1.2.0.orig.tar.gz
 98f74401c0a1961f0de33fd3d9781a09 2751 perl optional 
libparse-debianchangelog-perl_1.2.0-1.debian.tar.gz
 530f208614790d5e4317a2cdda003d9f 62312 perl optional 
libparse-debianchangelog-perl_1.2.0-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk2aBO4ACgkQQbn06FtxPfDHXgCfeEZajDn2e07Amac9JIA+xhiF
0foAoPkoOqZzN4klnfP5gz4Dm6Mb2MQ+
=u+qh
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to