Skip Menu |

This queue is for tickets about the Parse-Debian-Packages CPAN distribution.

Report information
The Basics
Id: 13251
Status: resolved
Priority: 0/
Queue: Parse-Debian-Packages

People
Owner: Nobody in particular
Requestors: cpan [...] hardcode.cotse.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.01
Fixed in: 0.01



Subject: Bad Regular Expression
distribution = Parse-Debian-Packages-0.01 perl -v = v5.8.4 uname -a = Linux xxxxxxx 2.6.8-2-386 #1 Thu May 19 17:40:50 JST 2005 i686 GNU/Linux The regular expression describing a key/value pair in a Debian Packages file is not written correctly: The module uses: m/^(.*): (.*)/ But it should use: m/^(\S.*): (.*)/ ...in order to correctly parse the Description field.
--- /usr/share/perl5/Parse/Debian/Packages.pm 2005-05-03 14:38:32.000000000 -0400 +++ /usr/share/perl5/Parse/Debian/Packages.pm.new 2005-05-03 14:38:41.000000000 -0400 @@ -16,7 +16,7 @@ my %parsed; while (<$fh>) { last if /^$/; - if (my ($key, $value) = m/^(.*): (.*)/) { + if (my ($key, $value) = m/^(\S.*): (.*)/) { $parsed{$key} = $value; } else {
Fixed in 0.02, which I forgot to release. Did some tidy up and released 0.03 just now -- Richard Clamp <richardc@unixbeard.net>