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: $!"; }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: IO::Prompt - Cannot write to terminal
by wind (Priest) on Jul 21, 2007 at 02:28 UTC
    I noticed. The only test script is 00.load.t, which as its name implies only requires that the module be able to load.

    I plan on sending him a new test script named 01.dependencies.t
    use Test::More tests => 2; # Depends on hardcoded /dev/tty access ok( open(my $OUT, ">/dev/tty"), "Output to /dev/tty"); ok( open(my $IN, "</dev/tty"), "Input from /dev/tty");
    Any bet on whether or not he'll actually include it in the release?

    - Miller