Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?

by gaal (Parson)
on Jan 13, 2007 at 17:25 UTC ( #594558=note: print w/replies, xml ) Need Help??


in reply to How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?

See this old thread: Catching errors in closing lexical filehandles
  • Comment on Re: How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?

Replies are listed 'Best First'.
Re^2: How do I make the garbage collector throw an exception when it fails to auto-close a filehandle?
by Aristotle (Chancellor) on Jan 14, 2007 at 01:41 UTC

    Thanks for that link! Some interesting stuff in your thread which wasnt discussed here in mine.

    Seems like clobbering IO::Handle::DESTROY is the only way to do this, but that its at least reliable. Maybe I should put IO::Handle::CheckedAutoclose on the CPAN or something. :-)

    Makeshifts last the longest.

      I don't like the extra scope and the fact that it's local at best. If you do put it on CPAN, make a note to say it isn't thread safe.

        Id want it global. Otherwise Id subclass IO::Handle and instantiate that class instead; that works just as well and wont conflict with anything else.

        How does overriding DESTROY break thread safety?

        Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://594558]
help
Chatterbox?
[Corion]: Krug is generic pottery ware for pouring beverages, but a Bembel is painted with that blue paint and contains only (!) Apfelwein
[shmem]: Corion: alas, air too.
[Corion]: shmem: Yes, very sad!
[choroba]: doesn't sound much useful, which means I'll probably remember it
[karlgoethebier]: "that blue pain" == Salzglasur as far as i remember
[karlgoethebier]: Paint!
[shmem]: karlgoethebier the blue pain comes after all bembels are empty
[karlgoethebier]: Confusing "Bembel" with "Membel" might result in a slap in the face in Hesse...
[karlgoethebier]: shmem: Yes. Greetings from Dr. Freud
[Discipulus]: blue pain is a synōnyma

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-05-24 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?