in reply to Re: non-XS version of Term::ReadKey?
in thread non-XS version of Term::ReadKey?

Term::InKey is a good replacement for Term::ReadKey.

Doesn't appear so

http://cpansearch.perl.org/src/RAZINF/Term-InKey-1.04/Term/InKey.pm

sub WinSetConsole { return $WIN32CONSOLE if $WIN32CONSOLE; require Win32::Console; import Win32::Console; { local *STDERR; open STDERR, ">/dev/null"; $WIN32CONSOLE = Win32::Console-> new(Win32::Console->STD_INPUT_HANDLE); } return $WIN32CONSOLE; }
/dev/null on windows? and last updated in 2004

Replies are listed 'Best First'.
Re^3: non-XS version of Term::ReadKey?
by Khen1950fx (Canon) on Feb 08, 2011 at 08:46 UTC
    Good point. Thanks.

    If that causes problems for you, then you can always fix it to:

    open STDERR, '>', 'NUL';
    Or take it up a notch with File::Spec::Win32:
    sub WinSetConsole { return $WIN32CONSOLE if $WIN32CONSOLE; require Win32::Console; import Win32::Console; { require File::Spec::Win32; my $devnull = File::Spec::Win32->devnull(); local *STDERR; open STDERR, '>', $devnull; $WIN32CONSOLE = Win32::Console-> new(Win32::Console->STD_INPUT_HANDLE); } return $WIN32CONSOLE; }