in reply to Re: 5.10 shows uninitialized $@ warning
in thread 5.10 shows uninitialized $@ warning

Bad example. 1/0 produces a compile-time exception in 5.8. Once you fix that, both behave identically and contrary to the OP's results.
use warnings; my $denum = 0; eval { local $SIG{'__DIE__'} = sub { die $@ }; print 1 / $denum; }; print "[$@]\n";
>c:\progs\perl588\bin\perl script.pl [Died at script.pl line 4. ] >c:\progs\perl5100\bin\perl script.pl [Died at script.pl line 4. ]
This is perl, v5.8.8 built for MSWin32-x86-multi-thread Binary build 817 [257965] provided by ActiveState http://www.ActiveSta +te.com This is perl, v5.10.0 built for MSWin32-x86-multi-thread Binary build 1001 [283495] provided by ActiveState http://www.ActiveSt +ate.com

Replies are listed 'Best First'.
Re^3: 5.10 shows uninitialized $@ warning
by syphilis (Archbishop) on May 16, 2008 at 14:54 UTC
    Bad example

    It was a perfectly fine example (in terms of the op's original conditions ;-)

    Cheers,
    Rob

      Your code never gets to execute the eval, much less to using $@ afterwards, so you couldn't possibly get the a warning from using $@. That's like saying "I can't replicate the fact that you got 'foo' on the screen, but ignore the fact that I didn't actually call a print function."

        Your code never gets to execute the eval

        Bullshit - under 5.10 at least - and whether or not it gets executed under perl 5.8 is irrelevant in terms of the original post. (It's the 5.10 behaviour that the op is interested in.)

        Let's just agree to have our respective lawyers sort this out tomorrow.

        Cheers,
        Rob