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).
Migrated from rt.perl.org#128605 (status was 'new')
Searchable as RT128605$
The text was updated successfully, but these errors were encountered: