Win32::Console
Win32::Console implements the Win32 console and character mode functions. They give you full control on the console input and output, including support of offscreen console buffers (e.g., multiple screen pages); reading and writing of characters, attributes, and whole portions of the screen; and complete processing of keyboard and mouse events.
The new constructor
is used to create a console object. It can take two forms:
$con = Win32::Console->new(standard_handle); $con = Win32::Console->new(accessmode,sharemode);
The first form creates a handle to a standard channel.
standard_handle can be one of STD_OUTPUT_HANDLE, STD_ERROR_HANDLE, or STD_INPUT_HANDLE.
The second form creates a console screen buffer in memory, which
you can access for reading and writing as a normal console, and then
redirect on the standard output (the screen) with Display. In this case, you can specify
accessmode to be GENERIC_READ, GENERIC_WRITE, or both, determining the
permissions you will have on the created buffer.
sharemode affects how the console can
be shared. It can be specified as either FILE_SHARE_READ, FILE_SHARE_WRITE, or both. If you don’t
specify any of those parameters, all four flags will be used.
The following methods are supported by the Win32::Console module.