in reply to Re^2: warnings under the debugger
in thread warnings under the debugger

When I tried it (I don't use the debugger normally), I found that the warning is shown, if warnings are switched on. Here is a (slightly edited) session:
anno@oliva> perl -wd -e '' Loading DB routines from perl5db.pl version 1.28 [...] DB<1> $x = { 1 } Odd number of elements in anonymous hash at (eval 10)[/usr/local/lib/p +erl5/5.8.7/perl5db.pl:628] line 2. [...]
So it seems the debugger has ways of restoring the warning state of the outer interpreter in an eval. (Can't be that hard). Why the original poster didn't see the warning remains an open question.

Anno

Replies are listed 'Best First'.
Re^4: warnings under the debugger
by Moron (Curate) on Mar 12, 2007 at 14:14 UTC
    Yes, I see your point. I think it's because -w (which you used in your test) makes the debugger eval with warnings as well whereas -Mwarnings (which the OP used instead) loads the warnings pragma as if it were explicitly loaded for the code being debugged while leaving the debugger's own separate interpreter instance unaffected.

    -M

    Free your mind