Skip Menu |
 

Preferred bug tracker

Please email the preferred bug tracker to report your issue.

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Term-ReadLine CPAN distribution.

Report information
The Basics
Id: 83784
Status: open
Priority: 0/
Queue: Term-ReadLine

People
Owner: Nobody in particular
Requestors: AERO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.10
Fixed in: (no value)



Subject: Problem with Win32::Console::ANSI module.
Download (untitled) / with headers
text/plain 510b
Hi Devel::REPL uses Term::ReadLine module for REPL. It seems that Term::ReadLine can't properly handle Win32::Console::ANSI ansi code. Please see https://rt.cpan.org/Ticket/Display.html?id=59429#txn-1187270 Shortcut one-liners for test. Show quoted text
>perl -MTerm::ANSIColor -MWin32::Console::ANSI -e "print STDOUT
color('red'),'Hello',color('reset')" Hello Show quoted text
>perl -MTerm::ReadLine -MTerm::ANSIColor -MWin32::Console::ANSI -e
"$t=Term::ReadLine->new();print {$t->OUT} color('red'),'Hello',color('reset')" Hello
Subject: Re: [rt.cpan.org #83784] Problem with Win32::Console::ANSI module.
Date: Tue, 12 Mar 2013 12:34:25 -0700
To: "C.H. Kang via RT" <bug-Term-ReadLine [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
Download (untitled) / with headers
text/plain 799b
On Wed, Mar 06, 2013 at 07:52:33AM -0500, C.H. Kang via RT wrote: Show quoted text
> Devel::REPL uses Term::ReadLine module for REPL. > It seems that Term::ReadLine can't properly handle Win32::Console::ANSI > ansi code.
??? Show quoted text
> >perl -MTerm::ANSIColor -MWin32::Console::ANSI -e "print STDOUT
> color('red'),'Hello',color('reset')" > Hello >
> >perl -MTerm::ReadLine -MTerm::ANSIColor -MWin32::Console::ANSI -e
> "$t=Term::ReadLine->new();print {$t->OUT} > color('red'),'Hello',color('reset')" > Hello
As far as know, Windows does not handle ANSI codes. In your code, $t->OUT is just a handle to the console character device. If the console magicalizer you use can handle arbitrary file handles (and would not just usurp STDOUT), you may want to ask it to magicalize this handle. Hope this helps, Ilya


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.