# Term::ANSIColor -- Color screen output using ANSI escape sequences.
-# $Id: ANSIColor.pm,v 1.7 2003/03/26 07:00:51 eagle Exp $
+# $Id: ANSIColor.pm,v 1.8 2004/02/20 06:21:26 eagle Exp $
#
# Copyright 1996, 1997, 1998, 2000, 2001, 2002
# by Russ Allbery <rra@stanford.edu> and Zenin <zenin@bawdycaste.com>
@ISA = qw(Exporter);
@EXPORT = qw(color colored);
@EXPORT_OK = qw(uncolor);
-%EXPORT_TAGS = (constants => [qw(CLEAR RESET BOLD UNDERLINE UNDERSCORE BLINK
- REVERSE CONCEALED BLACK RED GREEN YELLOW
- BLUE MAGENTA CYAN WHITE ON_BLACK ON_RED
- ON_GREEN ON_YELLOW ON_BLUE ON_MAGENTA
+%EXPORT_TAGS = (constants => [qw(CLEAR RESET BOLD DARK UNDERLINE UNDERSCORE
+ BLINK REVERSE CONCEALED BLACK RED GREEN
+ YELLOW BLUE MAGENTA CYAN WHITE ON_BLACK
+ ON_RED ON_GREEN ON_YELLOW ON_BLUE ON_MAGENTA
ON_CYAN ON_WHITE)]);
Exporter::export_ok_tags ('constants');
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings.
-$VERSION = 1.07;
+$VERSION = 1.08;
##############################################################################
# Internal data structures
Alternately, if you import C<:constants>, you can use the constants CLEAR,
RESET, BOLD, DARK, UNDERLINE, UNDERSCORE, BLINK, REVERSE, CONCEALED, BLACK,
-RED, GREEN, YELLOW, BLUE, MAGENTA, ON_BLACK, ON_RED, ON_GREEN, ON_YELLOW,
-ON_BLUE, ON_MAGENTA, ON_CYAN, and ON_WHITE directly. These are the same as
-color('attribute') and can be used if you prefer typing:
+RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, ON_BLACK, ON_RED, ON_GREEN,
+ON_YELLOW, ON_BLUE, ON_MAGENTA, ON_CYAN, and ON_WHITE directly. These are
+the same as color('attribute') and can be used if you prefer typing:
print BOLD BLUE ON_WHITE "Text\n", RESET;
- Term::ANSIColor version 1.07
+ Term::ANSIColor version 1.08
(A simple ANSI text attribute control module)
Copyright 1996, 1997, 1998, 2000, 2001, 2002
To ATricket for the information about what PuTTY, Windows telnet, and
OpenSSH under Cygwin support.
+ To Richard Maus for pointing out DARK was missing from the exported
+ constants list and CYAN and WHITE were missing from the documentation.
+
To Larry Wall, as always, for Perl.
-# Test suite for the Term::ANSIColor Perl module. Before `make install' is
-# performed this script should be runnable with `make test'. After `make
-# install' it should work as `perl test.pl'.
+#!/usr/bin/perl
+# $Id: test.pl,v 1.3 2004/02/20 06:21:26 eagle Exp $
+#
+# test.pl -- Test suite for the Term::ANSIColor Perl module.
+#
+# Before "make install" is performed this script should be runnable with "make
+# test". After "make install" it should work as "perl test.pl".
############################################################################
# Ensure module can be loaded
############################################################################
-BEGIN { $| = 1; print "1..12\n" }
+BEGIN { $| = 1; print "1..13\n" }
END { print "not ok 1\n" unless $loaded }
delete $ENV{ANSI_COLORS_DISABLED};
use Term::ANSIColor qw(:constants color colored uncolor);
} else {
print "not ok 12\n";
}
+delete $ENV{ANSI_COLORS_DISABLED};
+
+# Make sure DARK is exported. This was omitted in versions prior to 1.07.
+if (DARK "testing" eq "\e[2mtesting\e[0m") {
+ print "ok 13\n";
+} else {
+ print "not ok 13\n";
+}