in reply to Strange Win32::MsgBox behavior with PAR

You had no replies, so I thought I'd try it. If it is any consolation I reproduced your problem easily, I'm using XP SP2 with ActiveState perl 5.8.8 and PAR 0.952. I spotted a comment in the PAR documentation concerning Glade and stack unwinding as a bug - possibly related?
As an alternative work-around:
use strict ; use warnings ; use Win32 ; sub die_handler { Win32::MsgBox ("Error : @_" , 0, $0 ) } ; eval {die "ARRG" }; die_handler ("$@") if $@; print "Ended OK\n";
Seems to work correctly. I suggest you use this method of trapping die's, and report a bug to the PAR guys.

Replies are listed 'Best First'.
Re^2: Strange Win32::MsgBox behavior with PAR
by ZlR (Chaplain) on Aug 31, 2006 at 10:33 UTC
    Hi cdarke,

    Thanks for your solution. Since this means i must eval die and "handle" every time the program dies I simply wrote a

    personal_death  { Win32::MsgBox ("Error :  @_ " ,  0, $0 ) ; exit }

    function . I use it instead of die thru all the code .

    Now this is certainly not as clean as the SIG{__DIE__} option, so i reported a bug .

    update:

    $SIG{ __DIE__ } = sub { Win32::MsgBox ("Error : @_ " , 0, $0 ); exit(1 +); } ;

    ... is the way to do it !