Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the ExtUtils-Manifest CPAN distribution.

Report information
The Basics
Id: 12460
Status: resolved
Priority: 0/
Queue: ExtUtils-Manifest

People
Owner: Nobody in particular
Requestors: salvejn+cpanbugs [...] met.no
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: ExtUtils::Manifest doesn't understand filenames with spaces
I'm trying to keep track of a set of web pages that are supposed to be distributed as a OpenInteract2 package. OpenInteract2 uses ExtUtils::Manifest to check if all or too many files are present. The problem arises when I add files that contain spaces in them, at which ExtUtils::Manifest gets thorougly confused - expecting that all text after the first space on a line should be interpreted as a comment. This kind of sucks on filesystems where spaces are legal in filenames. :-\ Would it be sensible to allow escaping of filenames? e.g. allowing a MANIFEST (or MANIFEST.SKIP) file like this: ===============================8<--------------------------------------- Build.PL MANIFEST MANIFEST.SKIP t/00_use.t data/A\ file\ with\ spaces.txt spaces in filename data/A\ dir\ with\ spaces/fnord.txt spaces in dirname data/A\ file\ with\ spaces\ and\ a\ \\.txt spaces and \ in filename data/A\ dir\ with\ spaces\ and\ a\ \\/fnord.txt spaces and \ in dirname ------------------------>8=============================================== In general, unix filesystems allow filenames containing any character except / and \0 .... I'm not sure what the filename rules are on other systems, but it would be great if ExtUtils::Manifest didn't break at least when it bumps into commonly used legal filename conventions. I've tested this with ExtUtils::Manifest version 1.46 (part of ExtUtils-MakeMaker-6.27)
[guest - Fri Apr 29 05:20:35 2005]: Show quoted text
> Would it be sensible to allow escaping of filenames?
I think this is sensible and I'd accept a patch for it.
From: Ken Williams
I'm not completely opposed to this idea, but somewhat opposed. What happens if someone wants to use one of these packages on a system where spaces aren't allowed? They're just out of luck? Also, the proposed solution of escaping with backslashes is backward-incompatible, because on many systems (unixes, for example) '\' is a perfectly valid filename character. On other systems like Win32, it's even worse, because it's a *special* path character. I realize that this is just the flip side of the argument in the first paragraph, and that it's pretty rare anyway, but I think it's worth mentioning. Ideally this change would be made by introducing a new MANIFEST syntax that used to be a syntax error. But there are no syntax errors in MANIFESTs, unfortunately. Perhaps the second-best option would be to introduce a MANIFEST.yml or MANIFEST.tab or some new format that's more powerful. I don't know if I really like any of the possible options, though. -Ken
RT-Send-CC: yves [...] cpan.org, konobi [...] cpan.org
We're discussing this on #p5p and it seems the simplest thing to do is to just allow quoting. Single quotes with just two escapes, \' and \\. Only /^'/ counts as a quoted filename. 'this is a filename with a space' and a comment That's "this is a filename with a space" and the comment "and a comment". 'Can\'t touch this' "Can't touch this" 'windows\paths\work too' "windows\\paths\\work too" 'the filename ends at the quote not the newline' "the filename ends at the\nquote not the newline" That last one avoids the need to escape the newline if someone wants to be really insane and specify a newline in a filename. I believe that allows any possible relative filename with a minimum of quoting or escapes. This would break anyone using a single quote as the first character of a filename, I'm doing a grep of CPAN just to see if anyone's crazy enough.
On Mon Mar 24 21:06:56 2008, MSCHWERN wrote: Show quoted text
> We're discussing this on #p5p and it seems the simplest thing to do is > to just allow quoting. Single quotes with just two escapes, \' and \\. > Only /^'/ counts as a quoted filename. > > 'this is a filename with a space' and a comment > > That's "this is a filename with a space" and the comment "and a comment". > > 'Can\'t touch this' > > "Can't touch this" > > 'windows\paths\work too' > > "windows\\paths\\work too" > > 'the filename ends at the > quote not the newline' > > "the filename ends at the\nquote not the newline" > > That last one avoids the need to escape the newline if someone wants to > be really insane and specify a newline in a filename. > > I believe that allows any possible relative filename with a minimum of > quoting or escapes. > > This would break anyone using a single quote as the first character of a > filename, I'm doing a grep of CPAN just to see if anyone's crazy enough.
There was a patch supplied at http://rt.cpan.org/Ticket/Display.html?id=34414 for allowing filenames with spaces which I applied to the svn sources: http://svn.perl.org/modules/ExtUtils-Manifest/trunk/ I'd like to write a few more tests, especially involving manifest.skip files, and then I'll release a new version to CPAN. Thanks very much.
ExtUtils-Manifest-1.53 has just been released to CPAN which recognizes filenames with spaces.