develooper Front page | perl.perl5.porters | Postings from April 2016

Re: [perl #126579] should not warn about stripped newlines in 2-argopen

Thread Previous
From:
wolfsage
Date:
April 24, 2016 17:05
Subject:
Re: [perl #126579] should not warn about stripped newlines in 2-argopen
Message ID:
CAJ0K8bgiS0C3R22v6O1QD_h2YLzLLBEeBs8SeDEwifGZ3936OQ@mail.gmail.com
On Sun, Jan 17, 2016 at 10:59 PM, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:
> So the behaviours must flip – the 2-arg open does warn but ought not
> while the 3-arg open doesn’t warn but ought to.

Hmm, it seems strange that we no longer want to warn on 2-arg open.

If a user does this intentionally:

  open(my $fh, "<somefile\n");

it will fail and may surprise them that it didn't work....

Regardless, thanks for the explanation.

A possible fix is at
http://perl5.git.perl.org/perl.git/commitdiff/ab3be07ebaf7e0b17d0482e6a74e69074f0f6e33.

-- Matthew Horsfall (alh)

Thread Previous


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