[svn:parrot] r46793 - trunk

coke at svn.parrot.org coke at svn.parrot.org
Wed May 19 15:08:34 UTC 2010


Author: coke
Date: Wed May 19 15:08:34 2010
New Revision: 46793
URL: https://trac.parrot.org/parrot/changeset/46793

Log:
use PAGER if set.

Modified:
   trunk/parrotbug

Modified: trunk/parrotbug
==============================================================================
--- trunk/parrotbug	Wed May 19 13:09:23 2010	(r46792)
+++ trunk/parrotbug	Wed May 19 15:08:34 2010	(r46793)
@@ -428,7 +428,17 @@
 # Display everything collected.
 sub dump_report { 
     print "==> Dumping message...\n";
-    print format_message();
+    my $report = format_message();
+
+    if ( defined($ENV{PAGER}) ) {
+        open(my $ofh, '|-', $ENV{PAGER});
+        print {$ofh} $report;
+        close $ofh;
+    }
+    else {
+        print $report;
+    }
+
 }
 
 


More information about the parrot-commits mailing list