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

[perl #57512] Implicit close()s are silently unchecked for error

From:
Father Chrysostomos via RT
Date:
September 21, 2014 21:00
Subject:
[perl #57512] Implicit close()s are silently unchecked for error
Message ID:
rt-4.0.18-5193-1411333233-1861.57512-15-0@perl.org
On Thu Sep 18 00:08:39 2014, sprout wrote:
> On Mon Sep 15 12:35:42 2014, tom christiansen wrote:
> > "Father Chrysostomos via RT" <perlbug-followup@perl.org> wrote
> >     on Sun, 14 Sep 2014 14:47:03 PDT:
> >
> > > Would it be possible to modify handles to store the errno value
> > > instead of simply an error flag?  Then close() could set it, and
> > > what
> > > people have been recommending for years (close or die $!) will
> > > start
> > > to do what people expect more reliably than before.
> >
> > I hope so.  Whether you justify it with DWIM or by calling not doing
> > it a
> > violation of the principle of least surprise, it seems worthy of
> > serious
> > consideration.
> 
> I have implemented this on the sprout/destroio branch.  I have tested
> it manually on Mac OS X, but the VMS and Windows code is completely
> untested.  I see no way to automate a test for this.
> 
> I would appreciate it if people with VMS and Windows could try this
> out, using a small disk image (or floppy disk if your computer still
> takes them), and see whether things work as expected.

The Windows smokes from the smoke-me/destroio branch show that it won’t even compile there.  I’ve not been able to figure out why.  Any help would be appreciated.

-- 

Father Chrysostomos


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



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