When you’re writing a webapp framework, everything is important, because what you want is that your framework is as easy as possible to adopt.
That means, quite everything you implement should play in that direction, you have to make the life easier for the end-user, eg the web developer.
These daysnights, I work on writing a cool and extensible error catcher for Dancer, I want it to grab all errors or warnings and display them as informative as possible. The last item I wanted was to display to code region where the catched error did occur.
Perl did give me already the error message, the file and the line, what remained to do was to read the file and display to revelant part of it.
As a picture is better than a long story, please take a look at that screenshot.
The git commit is on the way ;)
That is pretty cool. :)
:-) Next step is to support Devel::SimpleTrace‘s output as well, so we can display a nice stackcall instead of a single error message. This will be shipped with 0.9905 (but is already in GitHub repo).