[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: binmode
From: |
Akim Demaille |
Subject: |
Re: binmode |
Date: |
19 Sep 2001 16:57:42 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
>>>>> "Tim" == Tim Van Holder <address@hidden> writes:
Tim> binmode $fh->SUPER;
>> It might be right, I just don't understand it! Why not binmode
>> $fh?
Tim> I don't know - I was making it up as I went along. It's quite
Tim> possible binmode $fh would be enough; it's just that OO Perl is
Tim> somewhat outside my current Perl knowledge.
Actually, just forget about OO here, it's merely a set of values ($<
@, %, etc.) bound to that ``typeglob''. binmode looks at its file
handle part, there is nothing related to inheritance etc.
Hence, IMHO, SUPER is totally superfluous: there is no difference.
Tim> Of course, this second draft also dropped too much; it would
Tim> cause _every_ file to be in binary mode, and we don't want that
Tim> for input files (besides the CR issus, putting stdin in binmode
Tim> locks up the console under DJGPP).
Maybe you want to check whether open is asked to open an output or
input file.
Tim> Also, autom4te's main work is done through a call to system()
Tim> which uses regular redirection, so that output file (which seems
Tim> to be the main output file) will have DOSish line endings under
Tim> DOS (which makes the resulting configure scripts unrunnable under
Tim> most Unices). I don't see a good way out of that (unless the
Tim> system() is changed to an XFile pipe, but I'm not sure whether
Tim> that's worth it).
There are certainly means to know a posteriori whether a file is used
as output.
- (no subject), Tim Van Holder, 2001/09/16
- Re: (no subject), Akim Demaille, 2001/09/17
- Re: (no subject), Tim Van Holder, 2001/09/17
- Re: (no subject), Tim Van Holder, 2001/09/17
- Re: (no subject), Akim Demaille, 2001/09/18
- Re: (no subject), Tim Van Holder, 2001/09/18
- Re: (no subject), Akim Demaille, 2001/09/18
- Re: (no subject), Tim Van Holder, 2001/09/18
- Re: binmode,
Akim Demaille <=
- Re: binmode, Akim Demaille, 2001/09/19
- Re: binmode, Tim Van Holder, 2001/09/20