mzedeler has asked for the wisdom of the Perl Monks concerning the following question:
I am running perl version 5.12.4 and for some reason, Guard and friends aren't working?
If I try this:
perl -MGuard -e '{scope_guard { warn }; sleep 3 }'...and wait for 3 seconds, then I get a warning. But if I break the program (ctrl-C) - SIGINT, nothing happens. The guard is never run.
This behaviour is the same with Scope::Guard and End. Maybe something with a change of the behaviour of global destruction when perl exits? Any suggestions?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Guard, Scope::Guard and End defunct in perl 5.12?
by moritz (Cardinal) on Feb 07, 2012 at 15:12 UTC | |
by mzedeler (Pilgrim) on Feb 07, 2012 at 20:22 UTC | |
|
Re: Guard, Scope::Guard and End defunct in perl 5.12?
by Anonymous Monk on Feb 07, 2012 at 15:11 UTC | |
by mzedeler (Pilgrim) on Feb 07, 2012 at 20:24 UTC |