develooper Front page | perl.perl5.porters | Postings from December 2002

[DRAFT PATCH] EOL agnosticism

Thread Next
From:
Jarkko Hietaniemi
Date:
December 26, 2002 10:12
Subject:
[DRAFT PATCH] EOL agnosticism
Message ID:
20021226181215.GA353020@lyta.hut.fi
The attached patch seems to work with my extremely limited testing
so that Perl scripts can be any of the LF, CRLF, or CR end-of-lined.
(Not that great a feat since the LF and CRLF have both worked already.)
(No, this patch doesn't do the mythical LFCR.)

The new test script t/comp/eol.t is the extremely limited testing,
it tries to create a script in all the three EOLings, and parse and
execute it, and verify the results.  I've only tried this in one UNIX
variant of the PerlIO_fast_gets() kind, so I can't really say that
I've tested much.

Looking at the crux of the matter, Perl_sv_gets(), I notice both that
strange and wonderful lands like VMS and non-PerlIO_fast_gets() lands
might not be quite right yet.  Furthermore, there might be more
parsing code changes needed in various places (mostly toke.c,
probably) like the changes I needed to make to format parsing.

An additional doubt I have whether my changes slowed down, err,
quieted down, the screaming of Perl_sv_gets() too much.  That is,
does my extra logic slow down reading in scripts too much.

Of course, the ultimate acid test will be whether this patch really
works in Mac OS Classic (CR) and whether the patch didn't broke Win32 (CRLF).

-- 
Jarkko Hietaniemi <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Next


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