This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix [perl #80632] -MO=Concise,-tree format
authorReini Urban <rurban@x-ray.at>
Mon, 13 Dec 2010 19:06:33 +0000 (20:06 +0100)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 17 Dec 2010 04:41:39 +0000 (20:41 -0800)
Some time between 5.8.3 and 5.8.4, the -tree output
format started getting extra line breaks.

ext/B/B/Concise.pm

index 6d06956..fbc02ad 100644 (file)
@@ -586,7 +586,7 @@ sub fmt_line {    # generate text-line for op.
     $text = "# $hr->{src}\n$text" if $show_src and $hr->{src};
 
     chomp $text;
-    return "$text\n" if $text ne "";
+    return "$text\n" if $text ne "" and $order ne "tree";
     return $text; # suppress empty lines
 }