There's detailed documentation on the link above but the basic idea of the module is to install signal handlers that print the source code around lines giving rise to exceptions or warnings. It can be used in the command-line with -d:file although I'd like it to be safe to leave in your PERL5OPT while developing.
I asked about die/warn signal handler best practice questions already, interacting with other handlers is still a tricky business. The alpha version tries to play well with others but I'm swinging towards refusing to install if there's already another custom handler. Thoughts?
Other questions that I'm pondering are:
Should warnings be intercepted?
Should user exceptions such as croak be intercepted?
What about stack dumps?
(Note that the __DIE__ handler is called just before the program ending,
so shouldn't interfere with exception handling)
How many lines of context should be shown?
Should the source be appended to all errors, or inserted after each?
I received a suggestion to only show context for the first syntax error
as it's often the source of later problems, agree?
Currently, I use the source available from the debugger when -d is
used and fallback to using IO::All otherwise. Is it worth trying to
support the two, even though there will inevitably be differences?
Other suggestions and tips welcome.
-d:brief -d:flower -d:mote -d:spair -d:vic +e -d:ceased -d:form -d:notation -d:spise -d:vil -d:code -d:fuse -d:nouement -d:spot -d:voi +d -d:cry -d:grade -d:parts -d:tail -d:vot +e -d:duce -d:light -d:press -d:ter -d:fault -d:lineate -d:range -d:test -d:feat -d:mean -d:ride -d:velope -d:fect -d:mented -d:sist -d:viant
Brad
In reply to Designing Defaults for Devel::file by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |