Improve diagnostics.pm’s link rendering.
authorFather Chrysostomos <sprout@cpan.org>
Sun, 13 Feb 2011 02:05:14 +0000 (18:05 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 13 Feb 2011 02:05:14 +0000 (18:05 -0800)
commit4b056c0626143ea9b19431c50c5587207f7bfc77
tree1b9a9ea55f9a5500dc4ddd25ace548d097c07c24
parent070bca2dc77f646ea2d6f71077e2008c790ba9ca
Improve diagnostics.pm’s link rendering.

The number of L<foo/bar> links in perldiag has grown over time, and
diagnostics.pm has never been updated to render them nicely, resulting
in output like this:

Lexing code attempted to stuff non-Latin-1 character into Latin-1 input at
  lib/diagnostics.t line 36 (#3)
     (F) An extension is attempting to insert text into the current parse
     (using lex_stuff_pvn_flags|perlapi/lex_stuff_pvn_flags or similar), but
     tried to insert a character that couldn't be part of the current input.
     This is an inherent pitfall of the stuffing mechanism, and one of the
     reasons to avoid it.  Where it is necessary to stuff, stuffing only
     plain ASCII is recommended.

I’ve implemented some rudimentary L<> parsing, which should suffice
for perldiag. I think using a real POD processor would be overkill.
lib/diagnostics.pm
lib/diagnostics.t