summaryrefslogtreecommitdiff
path: root/lib/diagnostics.pm
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-02-08 13:22:01 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-02-08 17:34:25 -0800
commit5604c7905b7cd780d72f15bc73dae69d1d1e944b (patch)
treecdc4d4a485dad3a6ecd2b25b44c0737f23e88445 /lib/diagnostics.pm
parentadf7680562287218c9f721ec3eb5028bc143e31b (diff)
downloadperl-5604c7905b7cd780d72f15bc73dae69d1d1e944b.tar.gz
Expand tabs in diagnostics.pm
Otherwise pod like this: The second situation is caused by an eval accessing a lexical subroutine that has gone out of scope, for example, sub f { my sub a {...} sub { eval '\&a' } } f()->(); is turned into this: The second situation is caused by an eval accessing a variable that has gone out of scope, for example, sub f { my $a; sub { eval '$a' } } f()->(); instead of this: The second situation is caused by an eval accessing a variable that has gone out of scope, for example, sub f { my $a; sub { eval '$a' } } f()->(); I don’t know how to test this without literally copying and pasting parts of diagnostics.pm into diagnostics.t. But I have tested it man- ually and it works.
Diffstat (limited to 'lib/diagnostics.pm')
-rw-r--r--lib/diagnostics.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm
index a85f282044..40c6748c57 100644
--- a/lib/diagnostics.pm
+++ b/lib/diagnostics.pm
@@ -194,6 +194,7 @@ our $TRACEONLY = 0;
our $WARNTRACE = 0;
use Config;
+use Text::Tabs 'expand';
my $privlib = $Config{privlibexp};
if ($^O eq 'VMS') {
require VMS::Filespec;
@@ -366,6 +367,7 @@ my %msg;
{
next;
}
+ $_ = expand $_;
s/^/ /gm;
$msg{$header} .= $_;
for my $h(@headers) { $msg{$h} .= $_ }