Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Strange Win32::MsgBox behavior with PAR

by ZlR (Chaplain)
on Aug 31, 2006 at 10:33 UTC ( #570576=note: print w/replies, xml ) Need Help??


in reply to Re: Strange Win32::MsgBox behavior with PAR
in thread Strange Win32::MsgBox behavior with PAR

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 !

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://570576]
help
Chatterbox?
[marioroy]: LA, yeah. than there's no reason why it cannot work inside qx. But chatting is hard in PM. I cannot see the code now.
[shmem]: Lady_Aleena: sometimes a quick glance isn't enough.
[Lady_Aleena]: What?! Can't stat ~/Music: No such file or directory? The ~/ doesn't expand?
[Lady_Aleena]: And the env variable $HOME doesn't work either. !@#$
[shmem]: no, that's a shell feature. Use $ENV{HOME}
[marioroy]: my $ans = qx{ find \$HOME -name "*.pl" -exec ls -l {} \\; };
[marioroy]: must backslash $ inside qx

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2017-04-23 21:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.