Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue #6 - help was not showing anything after first time, because ST…

…DOUT was closed. Fix: dup'd STDOUT in the implementation of Psh::OS::display_pod
  • Loading branch information...
commit 41b504efaa2676e66554fc90e6976a6963e60125 1 parent f62e47b
Rocky Bernstein authored
Showing with 4 additions and 2 deletions.
  1. +2 −1  lib/Psh/OS/Unix.pm
  2. +2 −1  lib/Psh/OS/Win.pm
3  lib/Psh/OS/Unix.pm
View
@@ -96,7 +96,8 @@ sub display_pod {
eval {
require Pod::Text;
- Pod::Text::pod2text($tmp,*STDOUT);
+ open STDOUT_SAVE, ">&", STDOUT;
+ Pod::Text::pod2text($tmp,*STDOUT_SAVE);
};
Psh::Util::print_debug_class('e',"Error: $@") if $@;
print $text if $@;
3  lib/Psh/OS/Win.pm
View
@@ -72,7 +72,8 @@ sub display_pod {
eval {
require Pod::Text;
- Pod::Text::pod2text($tmp,*STDOUT);
+ open STDOUT_SAVE, ">&", STDOUT;
+ Pod::Text::pod2text($tmp,*STDOUT_SAVE);
};
print $text if $@;
Please sign in to comment.
Something went wrong with that request. Please try again.