Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / 5.8.0 / Term / ANSIColor / README
Term::ANSIColor version 1.04
(A simple ANSI text attribute control module)
Copyright 1996, 1997, 1998, 2000, 2001 Russ Allbery <rra@stanford.edu>
and Zenin <zenin@bawdycaste.org>. This program is free software; you
may redistribute it and/or modify it under the same terms as Perl
itself.
INTRODUCTION
This module grew out of a thread on comp.lang.perl.misc where several of
us were throwing around different ways to print colored text from Perl
scripts and Zenin posted his old library to do that. I (Russ) disagreed
with the implementation and offered my own (the color() and colored()
functions implemented in this package), Zenin convinced me that the
constants had their place as well, and we started figuring out the best
ways of implementing both.
While ANSI color escape codes are fairly simple, it can be hard to
remember the codes for all of the attributes and the code resulting from
hard-coding them into your script is definitely difficult to read. This
module is designed to fix those problems, as well as provide a convenient
interface to do a few things for you automatically (like resetting
attributes after the text you print out so that you don't accidentally
leave attributes set).
Despite its name, this module can also handle non-color ANSI text
attributes (bold, underline, reverse video, and blink). It uses either of
two interfaces, one of which uses "constants" for each different attribute
and the other of which uses two subs which take strings of attributes as
arguments.
See the POD documentation for complete details, features, and usage.
INSTALLATION
Follow the standard installation procedure for Perl modules, which is to
type the following commands:
perl Makefile.PL
make
make test
make install
You'll probably need to do the last as root. If instead you wish to
install the module by hand, simply copy it into a directory named Term in
your Perl library directory.
Note that make install, for Perl 5.6.0 or later, will replace the
Term::ANSIColor that came with Perl. You may wan to save a backup copy
of the standard version first.
THANKS
To Jon Lennox for looking at early versions of this module, providing
feedback, and offering suggestions for improvement.
To Jesse Taylor for writing the first significant script to use this
module (colorized calsplit), thus offering innumerable opportunities to
test and debug.
To Jean Delvare for providing documentation of what the various
attributes do on various different terminal emulators, and for noting
that attribute 2 is dark.
To Edward Avis for the implementation of uncolor.
To Rani Pinchuk for the idea of ANSI_COLORS_DISABLED and an initial
implementation.
To Larry Wall, as always, for Perl.
Russ Allbery
rra@stanford.edu