develooper Front page | perl.perl5.porters | Postings from February 2014

[perl #121112] only warn about \n in failed file op if newline is trailing

Thread Next
From:
Tony Cook via RT
Date:
February 21, 2014 05:51
Subject:
[perl #121112] only warn about \n in failed file op if newline is trailing
Message ID:
rt-4.0.18-17180-1392961872-1724.121112-15-0@perl.org
On Wed Jan 29 06:15:51 2014, rjbs wrote:
> After reading #121085, Peter Rabbitson noted that the "Unsuccessful %s
> on
> filename containing newline" is triggered even if the newline is
> within the
> middle of a string.  If the problem we're guarding against is failure
> to chomp,
> we could only issue this warning at the end.
> 
> If we think it's important to also protect against (say) bad input
> record
> separator or failure to split(), then we can update the docs, but I
> think that
> the failure to chomp is the bigger deal, and we could reduce false
> positives.

The attached should do it, though I was pretty tired while I was doing it.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121112

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