develooper Front page | perl.makemaker | Postings from January 2006

Re: Help with a Cwd.pm build error

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
January 25, 2006 09:54
Subject:
Re: Help with a Cwd.pm build error
Message ID:
20060125163227.GY616@plum.flirble.org
On Wed, Jan 25, 2006 at 05:15:26PM +0100, demerphq wrote:
> On 1/25/06, Randy W. Sims <ml-perl@thepierianspring.org> wrote:
> > Too tired to think properly, but...
> >
> > demerphq wrote:
> > > Also, something that would be really useful would be a way to force
> > > perl to close all files. Ie, to unload all dll's, close any intenral
> > > filehandles kept open for __DATA__ and __END__ etc. Then this batch
> > > file malarky would be totally unnecessary.

> IMO almost as important is the ability to force all the DATA handles
> closed. But the ability to unload DLL's is a big step forward.

I think that you can brute force that by walking the entire symbol table,
taking all the typeglobs named "DATA" and close()ing them.

If you want to be really really horrible and close all file handles (or a
subset such all handles that don't turn out to a tty), even those that are no
longer referenced via symbol tables, you can probably do this with XS by
walking the SV arenas.

Nicholas Clark

Thread Previous | Thread Next


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