I've released Carp::Source. It exports a function, source_cluck(), that does pretty much the same as Carp's cluck() except it also displays the source code context of all call frames, with three lines before and after each call being shown, and the call being highlighted. Enjoy.
Not very useful to me in this form (Score:1)
In general I find that I don’t want to decide at the time of writing the code whether a particular instance of
croakwill dump a stack trace or not. All I can decide is whether to throw an exception or warning in the current context or that of the caller, depending on what makes more sense. Whether to get stack traces or not is something I can only decide when I’m running the code: while investigating a problem, I often want to turn them on globally.So I love Carp::Always, which makes all
warnRe: (Score:1)
Quick turnaround [cpan.org]!
Devel::file similar module (Score:1)