Hi all, I'm trying to do some exception handling similar to:
$SIG{__DIE__}=sub{$^S and return; print("DIED: ",@_); exit };
eval { die "cya!\n" };
$@ and die "outside: ",$@;
I expect this to produce "DIED: outside: cya!", and with perl 5.8 this is exactly what happens.
However perl 5.6 only gives "outside: cya!". Further hacking shows that the $^S variable is still set when eval exits (and trying to force $^S to 0 is runtime error).
Problem is that this needs to go into production environment with perl 5.6 (RH7.3 distro). Is there a workaround for this bug in 5.6?
Or, any information on installing 5.8 in tandem with existing 5.6 without exploding anything? :)
Thanks for your help.
--------
~%{${@_[0]}}->{0}&&+++ NO CARRIER
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.