in reply to Re: Automatic stack tracebacks in warnings?
in thread Automatic stack tracebacks in warnings?

He wants to "find a way to get tracebacks to warnings, even those generated by the compiler", so replacing warns with clucks won't do.

Replies are listed 'Best First'.
Re^3: Automatic stack tracebacks in warnings?
by brian_d_foy (Abbot) on Jul 05, 2005 at 19:40 UTC

    You don't have to replace every instance of warn() with cluck(). You just have to make perl call cluck() when it calls warn().

    The implementation of cluck() is simply

    package Carp; sub cluck { warn longmess @_ }

    Make your __WARN__ handler do that and you're all set.

    --
    brian d foy <brian@stonehenge.com>