Subject: | Module::CPANTS::Kwalitee::Manifest broken for MANIFESTs containing files with spaces |
My Win32 builds containing file names with internal whitespace are
incorrectly seen as violating the 'manifest_matches_dist' kwalitee
metric (see Win32::CommandLine v0.4.3.50 or earlier).
Since ExtUtils::Manifest v1.52+, MANIFEST file names can have internal
whitespace if surrounded by single quotes. The current version of
Module::CPANTS::Kwalitee::Manifest parses files containing whitespace
incorrectly. Note:
[from ExtUtils::Manifest:325:333]
# filename may contain spaces if enclosed in ''
# (in which case, \\ and \' are escapes)
if (($file, $comment) = /^'(\\[\\']|.+)+'\s*(.*)/) {
$file =~ s/\\([\\'])/$1/g;
}
else {
($file, $comment) = /^(\S+)\s*(.*)/;
}
next unless $file;
The broken code is at line #32:
[Module::CPANTS::Kwalitee::Manifest.pm:32]
s/\s.*$//; # strip file comments
It should be changed to something like:
if (s/^'(\\[\\']|.+)+'\s*.*/$1/) { s/\\([\\'])/$1/g; } else { s/\s.*$//;
} # strip quotes and comments
Thanks.
- Roy Ivy