[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. 0f9b1cfc081e0f7b87734a97a250ab0e08bafa04

sartak at bestpractical.com sartak at bestpractical.com
Tue Feb 17 15:30:42 EST 2009


The branch, master has been updated
       via  0f9b1cfc081e0f7b87734a97a250ab0e08bafa04 (commit)
      from  193e23dc0326f2cf008eaf51f47ad7f678aba278 (commit)

Summary of changes:
 lib/Prophet/CLI.pm |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 0f9b1cfc081e0f7b87734a97a250ab0e08bafa04
Author: Shawn M Moore <sartak at gmail.com>
Date:   Tue Feb 17 15:30:33 2009 -0500

    $pager has to be a global

diff --git a/lib/Prophet/CLI.pm b/lib/Prophet/CLI.pm
index 557cc38..7620fb7 100644
--- a/lib/Prophet/CLI.pm
+++ b/lib/Prophet/CLI.pm
@@ -167,6 +167,7 @@ sub get_pager {
 }
 
 our $ORIGINAL_STDOUT;
+our $pager;
 
 sub start_pager {
     my $self = shift;
@@ -175,7 +176,7 @@ sub start_pager {
         local  $ENV{'LESS'} = '-FXe';
         local  $ENV{'MORE'} = '-FXe';
 
-        my $pager = $self->get_pager();
+        $pager = $self->get_pager();
         return unless $pager;
         open (my $cmd, "|-", $pager) || return;
         $|++;
@@ -193,7 +194,8 @@ sub end_pager {
     return unless ($self->in_pager);
     *STDOUT = $ORIGINAL_STDOUT ;
     close($pager);
-    $ORIGINAL_STDOUT=undef;
+    $pager = undef;
+    $ORIGINAL_STDOUT = undef;
 }
 
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list