in reply to Re^2: IO::Prompt - Cannot write to terminal
in thread IO::Prompt - Cannot write to terminal
The module makes no attempt at portability. It opens dev/tty unconditionally. You can get the prompt to display by changing the first few lines of sub prompt, but after that you are in a world of hurt.
open $OUT, ($^O eq 'MSWin32' ) ? '>CON' : ">/dev/tty" or croak "Cannot write to terminal: $!" if !$OUT; $OUT->autoflush(1); @prompt = $flags{ -prompt } if !@prompt and $flags{ -prompt }; my $IN; if ($flags{-tty} || $flags{-argv}) { open $IN, ($^O eq 'MSWin32' ) ? '<CON' : ">/dev/tty" or croak "Cannot read from terminal: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: IO::Prompt - Cannot write to terminal
by wind (Priest) on Jul 21, 2007 at 02:28 UTC |