[PerlChina] perl shell in activeperl

Adriano Ferreira aferreira at shopzilla.com
Thu Nov 13 21:38:40 PST 2008


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
>


More information about the China-pm mailing list