Pathologically Eclectic Rubbish Lister | |
PerlMonks |
make dist (ExtUtils::MakeMaker) on Windows stores text files with DOS line endings in .tar.gz archiveby bart (Canon) |
on Nov 19, 2006 at 22:25 UTC ( [id://584983]=perlquestion: print w/replies, xml ) | Need Help?? |
bart has asked for the wisdom of the Perl Monks concerning the following question:
When preparing an upload to CPAN, I noticed that
doesn't convert the text files to Unix format before creating the .tar.gz archive file. I'm asking here: does this matter? Perl used to care about line endings in the source files, not even so long ago (= I'm sure there are still perl versions in use to which line endings matter). It no longer does, except at the end of a shebang line in a script, perhaps. Still, I don't think it's how it's supposed to be, for archives on CPAN. Hunting around in the guts of ExtUtils::MakeMaker, I read:
n.b. Do note the typo: the docs say $(TOUNIX), while actually it should be $(TO_UNIX). I reported that documentation bug earlier today. Apart from OS/2, none of the platforms seem to define a setting for $(TO_UNIX), and OS/2 does it in a most bizarre way (you have to "view source to see this):
Yowza: it seems to be using the ZIP command line tool, to decide which files are textfiles, and convert the line endings for those! My questions: Are the tarred up archived indeed Windows text files? Or does "something" magically convert the files to Unix? For example, PAUSE seems to be doing some additional processing before adding the archive to CPAN. Does it take care of these line endings too? If they are, and it doesn't: does it matter? If it matters, how do we patch it? I feel no inclination to copy the code used for OS/2. Thank you in advance for any suggestions.
Back to
Seekers of Perl Wisdom
|
|