I've been looking through the ExtUtils::Manifest package and it does not appear that you can.
Line 189 (in the maniread sub) splits a MANIFEST line with this code:
my($file, $comment) = /^(\S+)\s*(.*)/;
It looks like anything after the first set of spaces is considered a comment.
Update:
After further investigation it looks like the open statement in the cp_if_diff sub might be the problem. The open statement is:
open(F,"< $from\0") or die "Can't read $from: $!\n";
If there was some way to represent a file with spaces using escape sequences (eg \x20, \040 ...) that would make this command open a file then it should work. | [reply] [d/l] [select] |
Renaming the file isn't an option for me.
While renaming may in the end not be an option for you, I'd strongly suggest considering it, especially if you plan on having wide distribution for your module. I know it would be one of the first things I changed if I ended up packaging your module for inclusion in Debian.
| [reply] |
While renaming may in the end not be an option for you, I'd strongly suggest considering it, especially if you plan on having wide distribution for your module.
I can't because, um, it's an input file used to test my program for filenames containing spaces!
| [reply] |
Can you have the .t test file create a file with a space in the filename, and then run your test on that 'dynamically' created file?
This would solve your problem of not having to distribute it with the CPAN package.
| [reply] |
maniread in ExtUtils::Manifest treats everything after the first whitespace as a comment. Is there some way to specify a filename that contains a space? Renaming the file isn't an option for me.
No, but here is a novel idea though (:
use ExtUtils::Manifest();
sub ExtUtils::Manifest::maniread {
print "blah blah blah";
}
use ExtUtils::MakeMaker;
...
Previously I was leaving them out of the MANIFEST and added a PREOP in Makefile.PL to copy the files manually. Unfortunately, I've switched to Module::Install and it doesn't seem to have equivalent functionality. :(
According to scandeps, Module::Install doesn't use ExtUtils::Manifest so I'm not sure why you're looking at ExtUtils::Manifest, but you can always
- switch back to MakeMaker
- override/subclass the appropriate thing
MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] [d/l] |
Actually, Module::Build::Base uses ExtUtils::Manifest. Even worse, when you run "make dist" you get:
/usr/bin/perl -Iinc "-MExtUtils::Manifest=manicopy,maniread" \
-e "manicopy(maniread(),'Mail-Mbox-MessageParser-1.21.0', 'bes
+t');"
This means my only real option is to copy ExtUtils/Manifest.pm to inc/ and then modify it. Bleh. Instead, I've asked the author to provide support for escaped spaces in the MANIFEST.
In the meantime, I've done the following:
- comment out the lines in the MANIFEST that involve files with spaces
- Put the following at the end of Makefile.PL:
print "Fixing PREOP in the Makefile to copy files with spaces during
+ building\n";
my $commands = q{; \$(CP) t/mailboxes/*\\\\ * \$(DISTVNAME)/t/mailbo
+xes; \$(CP) t/results/*\\\\ * \$(DISTVNAME)/t/results};
system "$^X -pi -e 's|^(PREOP\\s*=.*)|\$1$commands|' Makefile";
The above code should work for both ExtUtils::MakeMaker and Module::Install. | [reply] [d/l] [select] |
Renaming the file (with a space in its name) isn't an option for me.
Well then, I guess making your package easy to port across platforms won't be an option either...
I don't know where the file names are coming from (a pipeline? a list file? File::Find or readdir running inside ExtUtils::Manifest?). If you have a chance to manipulate the list of file names before passing it to ExtUtils::Manifest, you might try converting space to something else (just within the list, without actually changing the directory entry for the file), then undo the conversion (turn it back into space) after ExtUtils::Manifest is done with it.
(... Just guessing.)
| [reply] |