develooper Front page | perl.perl5.porters | Postings from July 2011

[perl #93878] [PATCH] eol.t: Don't test for CR as line separator as that is deprecated

From:
Father Chrysostomos via RT
Date:
July 10, 2011 12:10
Subject:
[perl #93878] [PATCH] eol.t: Don't test for CR as line separator as that is deprecated
Message ID:
rt-3.6.HEAD-30268-1310324995-264.93878-15-0@perl.org
On Mon Jul 04 06:25:49 2011, marcgreen@WPI.EDU wrote:
> ______________________________________
> From: Father Chrysostomos via RT [perlbug-followup@perl.org]
> Sent: Sunday, July 03, 2011 9:48 PM
> To: Green, Marc Evan
> Subject: [perl #93878] [PATCH] eol.t: Don't test for CR as line
>    separator as that is deprecated
> 
> On Sun Jul 03 14:41:27 2011, ponguile@gmail.com wrote:
> > >
> > > Even if something is deprecated, but still supported, shouldn’t we
> > > continue to test for it, until the deprecated feature is removed?
> > >
> > > Sorry, it is not supported any more either. I discussed this issue
> on #p5p
> > but I cannot find the logs to prove it.
> 
> >Then how are the tests currently passing? I’m confused.
> 
> The tests use Pod::Html which *does* technically support '\r' as a
>    line separator -- it does a global s/\r/\n/ -- but pjcj enlightened
>    me that that behavior is no longer supported (see below). Note that
>    I am currently refactoring Pod::Html and it no longer will support
>    \r as a line separator.
> 
> Jun 30 18:42:37 <marcg>	a question about lib/Pod/t/eol.t: why should
>    '\r' be treated as a newline?
> Jun 30 18:42:52 <marcg>	I understand why \r\n is, but why just \r?
> Jun 30 18:43:14 <claes>	marcg: macos classic used that as line
>    separator
> Jun 30 18:43:50 <marcg>	thanks claes
> Jun 30 18:43:58 <pjcj>	but we don't support that any more, and I don't
>    think anything else uses it
> Jun 30 19:08:45 <marcg>	pjcj, so can I remove that part of the test?
> Jun 30 19:09:56 <pjcj>	I would imagine so, but it's hard to be sure
> Jun 30 19:10:14 <pjcj>	asking on the list, possibly with your patch,
>    might be wise

Oh no, not this again. :-(

The ability to run perl on a platform that uses \r as its default line
separator is orthogonal to the ability to process files that might have
originated on such a platform.

Furthermore, there are still Mac OS X programs that use \r as the line
separator.

So, no, I do not think Pod::Html should drop support for it. Why does it
need to? Is it because Pod::Simple does not support it? If not, why not?
If that was removed at some point, I think it should be reinstated.




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