Package: perl-modules Version: 5.8.8-4 Severity: normal Consider the following program: #! /usr/bin/perl
use Term::ANSIColor;
# This one lease the terminal in wrong color (up to next Enter)
print colored ("Text\n", 'bold blue on_white');
# The following sequence restores colors appropriately
# print colored ("Text", 'bold blue on_white');
# print "\n";
If you run it as is, then the terminal is not restored (you have to
press enter once to get it restored). If you separate the "\" out,
i.e. you uncomment the last two lines, then the terminal is restored
appropriately. I tried this on the linux console and in an xterm (both
current Etch of 2006-06-18).
This is contrary to what the man page says about colored:
As an aid to help with this, colored() takes a scalar as the
first argument ... returns the scalar wrapped in escape codes
so that the attributes will be set as requested before the
string and reset to normal after the string.
And the example includes the "\n" explicitly:
print colored ("Text\n", 'bold blue on_white');
Either the bug is in the perl module or in the documentation.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11.deb-7-grsec
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Versions of packages perl-modules depends on:
ii perl 5.8.8-4 Larry Wall's Practical Extraction
perl-modules recommends no packages.
-- no debconf information
--
Dr. Helge Kreutzmann [EMAIL PROTECTED]
Dipl.-Phys. http://www.helgefjell.de/debian.php
64bit GNU powered gpg signed mail preferred
Help keep free software "libre": http://www.ffii.de/
signature.asc
Description: Digital signature

