Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Automatically deleting selected directories on program exit

by hv (Prior)
on May 13, 2005 at 10:15 UTC ( [id://456657]=note: print w/replies, xml ) Need Help??


in reply to Automatically deleting selected directories on program exit

Hmm, I'd be somewhat concerned about this, purely because it is relying on effects during global destruction - I don't know exactly what order things happen during this phase, but based on bug reports I've seen it seems possible that in some cases some or all of the strings in the $on_close arrayref may get destroyed before $on_close itself.

If I remember correctly, the symptom would be "use of uninitialised value ... during global destruction", and one or more directories would not be cleaned up.

However I do use DESTROY effects on scope exit a lot - if you were to wrap a block around the main program and declare $On_close within that block I'd have every confidence in it.

Hugo

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://456657]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-25 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found