develooper Front page | perl.perl5.porters | Postings from January 2003

Re: [perl #19682] perldoc using \n rather than \r\n

From:
Philip Newton
Date:
January 23, 2003 20:24
Subject:
Re: [perl #19682] perldoc using \n rather than \r\n
Message ID:
3E30CE0A.24286.2B134@localhost
On 23 Jan 2003 at 4:12, via RT wrote:

> Do I understand correctly that this is simply a documentation issue, as in "do not
> try to use the Win98 more.com as your pager"?

*tries a few things out* Maybe. "type" can also not handle \n-
terminated lines, but when I "binmode STDOUT" and then output \n-
terminated lines from Perl, it displays correctly. (And DJGPP 'od' says 
that with binmode it sees '\n' and without it sees '\r\n', so the 
binmode does have an effect.) So I suppose the actual console output 
routines (or command.com, or whoever is responsible) *can* handle \n as 
line terminator.

Still, there isn't much choice under Win98. I don't think using WordPad 
as a pager (as ActiveState support suggested) is really the right 
solution. (And I don't even know whether it accepts input from STDIN 
anyway.) Hardly anyone, I'll assume, has DJGPP less or Vern Buerg's 
LIST or some other pager.

I think it would be much preferable to open the temporary file in text 
mode -- after all, Perl documentation is (more or less by definition) 
text. That way, we could accommodate Win98's brain-damaged more.com; 
after all, in previous releases it worked all right (when perldoc 
opened its own temp file in the default -- text -- mode rather than 
relying on File::Temp, which opens files in binary mode).

What do you suggest? Documenting that Win98's more.com does not work as 
a pager? What should Win98 users use then? (Note that "no pager" is not 
an option, either, since the Win9x console window does not have 
scrollback the way NT consoles do -- so you only see the last max. 50 
lines. At least as far as I can see. And telling them to "redirect 
output into a text file and open that with your favourite editor" is 
not very user-friendly, either, IMO.)

Cheers,
Philip
-- 
Philip Newton <Philip.Newton@gmx.net>




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About