Add support for multiline messages to splain
authorFather Chrysostomos <sprout@cpan.org>
Tue, 27 Dec 2011 04:39:19 +0000 (20:39 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 27 Dec 2011 04:39:19 +0000 (20:39 -0800)
commit0a437bc972cff19c42a0efc0b585280e585f3058
treed9e2cc57cf13be81e0dc7280a073a55fc721513f
parent33327ed8afe36c0226d45c7e93346669d395a14a
Add support for multiline messages to splain

All the ‘Compilation failed’ messages are actually multiline mes-
sages, like "Attempt to reload foo aborted.\nCompilation failed in
require at ...".

perldiag has separate entries for each line of the message, so it
makes sense to have it look up each line.  It can’t split it into
lines by default, but must check for a possible description first, as
sometimes syntax errors quote code with line breaks in it.

I had to rip out the nasty file-wide lexical $_, as I couldn’t local-
ise it, and I undid d923656e4 in the process.
lib/diagnostics.pm
lib/diagnostics.t