I'd recommend to treat %SIG as magic and not to expect local %SIG to have useful effects

perlvar says

> Due to an implementation glitch, the $SIG{__DIE__} hook is called even inside an "eval()".

this is a strong hint that the implementation doesn't always resolve %SIG like with normal variables ( well, that's why it's called a "special variable" anyway)

local %SIG looks wrong anyway since you are disabling all default settings of a running system

DB<100> \%SIG => do { my $a = { __DIE__ => sub { ... }, __WARN__ => sub { ... }, ABRT => undef, ALRM => undef, BUS => sub { ... }, CHLD => undef, CLD => undef, CONT => undef, FPE => "IGNORE", HUP => undef, ILL => undef, INT => sub { ... }, IO => undef, IOT => undef, KILL => undef, NUM32 => undef, NUM33 => undef, NUM35 => undef, NUM36 => undef, NUM37 => undef, NUM38 => undef, NUM39 => undef, NUM40 => undef, NUM41 => undef, NUM42 => undef, NUM43 => undef, NUM44 => undef, NUM45 => undef, NUM46 => undef, NUM47 => undef, NUM48 => undef, NUM49 => undef, NUM50 => undef, NUM51 => undef, NUM52 => undef, NUM53 => undef, NUM54 => undef, NUM55 => undef, NUM56 => undef, NUM57 => undef, NUM58 => undef, NUM59 => undef, NUM60 => undef, NUM61 => undef, NUM62 => undef, NUM63 => undef, PIPE => undef, POLL => undef, PROF => undef, PWR => undef, QUIT => undef, RTMAX => undef, RTMIN => undef, SEGV => 'fix', STKFLT => undef, STOP => undef, SYS => undef, TERM => undef, TRAP => undef, TSTP => undef, TTIN => undef, TTOU => undef, UNUSED => undef, URG => undef, USR1 => undef, USR2 => undef, VTALRM => undef, WINCH => undef, XCPU => undef, XFSZ => undef, }; $a->{SEGV} = $a->{BUS}; $a; }

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!


In reply to Re: Localizing %SIG by LanX
in thread Localizing %SIG by Darkwing

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.