[PerlChina] perl shell in activeperl

tiger peng tigerpeng2001 at yahoo.com
Fri Nov 14 19:05:35 PST 2008


Thanks. It works. I added user environment variable "PERL_RL" with value "o=0" to my computer. Both dbish and CPAN shell look clean now.


________________________________
From: Adriano Ferreira <aferreira at shopzilla.com>
To: china-pm at pm.org
Sent: Thursday, November 13, 2008 11:38:40 PM
Subject: Re: [PerlChina] perl shell in activeperl

2008/11/13 tiger peng <tigerpeng2001 at yahoo.com>:
> Hello,
>
> I am new to activeperl. Today, I installed DBI::Shell and played with dbish
> and ran into problem: the echoed input seems being wrapped by escaping
> characters. For example, when I entered "dev" the screen show
> "←[1md←[0m←[1me←[0m←[1mv←[0m". Could anyone tell me how to get a clean
> screen?

I think that's because the Perl terminal is trying to use ornaments
(you're seen ANSI escapes which are used to change the color and
brightness of the text and to control the terminal). But cmd.exe does
not provide an ANSI terminal.

As DBI::Shell uses Term::ReadLine, I think you can disable that by
defining an environment variable PERL_RL with the value

> set PERL_RL= o=0

as explained here:

http://search.cpan.org/perldoc?Term::ReadLine#ENVIRONMENT

Maybe there is a more reasonable way to do it by adding some lines to
the configuration file of DBI::Shell, but that should at least work.

Regards,
Adriano

> Thanks,
>
> Tiger,
>
> _______________________________________________
> China-pm mailing list
> China-pm at pm.org
> http://mail.pm.org/mailman/listinfo/china-pm
>
_______________________________________________
China-pm mailing list
China-pm at pm.org
http://mail.pm.org/mailman/listinfo/china-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/china-pm/attachments/20081114/f45f9897/attachment.html>


More information about the China-pm mailing list