develooper Front page | perl.perl5.porters | Postings from October 2018

[perl #126676] File handle doesn't close when out of scope due to\shift

Todd Rinaldo via RT
October 18, 2018 05:26
[perl #126676] File handle doesn't close when out of scope due to\shift
Message ID:
On Thu, 19 Nov 2015 09:20:06 -0800, sprout wrote:
> It has been on my ever-growing to-do list for some time to consider
> whether _GEN_NNN should every be added to the stash. Every time that
> happens, it’s a leak. Does anybody ever access them by name?
> Whether this should be fixed by (a) switching everything to __ANONIO__
> or by (b) using _GEN_NNN without adding it to the stash I cannot say.
> I don’t understand why we ended up with an inconsistency in the first
> place. (Digging in history to find out which one came first might shed
> some light on it.) Using _GEN_* does allow different handles to be
> distinguished in error messages, but __ANONIO__ certainly seems
> cleaner.  For backward-compatibility, though, maybe option b is the
> best choice.


We're in the process of submitting a change to Perl::Critic to discourage the use of \shift.

At this point we've now got 4 major versions of perl with this issue.

via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About