Skip Menu |

This queue is for tickets about the Win32-Console CPAN distribution.

Report information
The Basics
Id: 14811
Status: rejected
Worked: 10 min
Priority: 0/
Queue: Win32-Console

People
Owner: dada [...] perl.it
Requestors: bugspam.Callek [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Win32::Console::Mode unable to work correctly. (Input Handle)
When I do: my $STD_IN = new Win32::Console(STD_INPUT_HANDLE); my $mode = $STD_IN->Mode(); $STD_IN->Mode($mode & (~ENABLE_LINE_INPUT)); $STD_IN->InputChar(1); It Forces me to wait for a carrage return, and based on the win32 API, this should not happen. Workarounds appreciated, and/or fixes.
RT-Send-CC: jand [...] activestate.com
a quick Google search revealed that $STD_IN->Mode($mode & ~(ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT)) does what you want. eg. to remove the ENABLE_LINE_INPUT flag you need to remove ENABLE_ECHO_INPUT too. looks like it is a bug in the Win32 SDK itself (or its documentation, at least), rather than Win32::Console. cheers, Aldo