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

[perl #128605] Make handles themselves remember whether to warn whenclosed

From:
Father Chrysostomos
Date:
July 12, 2016 00:57
Subject:
[perl #128605] Make handles themselves remember whether to warn whenclosed
Message ID:
rt-4.0.18-32659-1468285053-1475.128605-75-0@perl.org
# New Ticket Created by  Father Chrysostomos 
# Please include the string:  [perl #128605]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128605 >


In ticket #128597, Zefram wrote:
> Whether a particular I/O handle should be warned for, upon implicit
> close, seems like a feature of the handle, which should be stored as
> a flag in the handle structure.  Obviously the flag state has to be
> initialised upon opening, and by default the flag could reasonably be
> set according to the warning flag prevailing *at the point of the open*.
> (It should also be possible to control the flag explicitly per handle.
> This could be done as a self-popping I/O layer, which would allow both
> setting the flag during open and changing it later.)

The purpose of this is to solve the problem of which scope is active during scope unwinding (that is never really clear, and it usually just emerges from the implementation).

-- 

Father Chrysostomos




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