perl + automode.o
Sat Aug 25 10:59:00 GMT 2001
Christopher Faylor wrote:
> On Fri, Aug 24, 2001 at 05:53:08PM +0200, Gerrit P. Haase wrote:
>>I compiled a version of miniperl with automode.o linked
>>in. First tests shows that it adresses the CR/LF problem.
> I don't think that compiling a general purpose programing package like
> perl with automode is a good solution.
> It just pushes the CRLF problem onto a different class of users.
Let me chime in here...after thinking about this a little harder, I
don't think "automode" is the right solution. But first, let's define
(1) Using Unix-line-endings on Unix(binary) mounts:
(2) Using DOS-line-endings on DOS(text) mounts
(3) Using Unix-line-endings on DOS(text) mounts
no problems reading, but output files get extraneous ^M's on disk.
That's okay though, because perl can still read them in (case #2 above)
(4) Using DOS-line-endings on binary mounts
Using automode will read the files in text(DOS) mode, and write them in
binary(UNIX) mode. But what if the file is actual *binary* data, and
not *text* at all?
What if you read a file into memory, close the file, open for write, and
the write the data back out. Through no intention or fault of your own,
if perl is linked with automode you've just done a DOS to UNIX conversion.
Maybe Chris' chomp() suggestion is the right thing.
I thought Eric had tracked down and squashed these bugs back in the
5.005_62 days, but then it reappeared in the 5.6.1-TRIAL release. Eric,
More information about the Cygwin-apps