1 Term::ANSIColor version 1.10
2 (A simple ANSI text attribute control module)
4 Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2005 Russ Allbery
5 <rra@stanford.edu> and Zenin. This program is free software; you may
6 redistribute it and/or modify it under the same terms as Perl itself.
8 I welcome bug reports and patches for this package at rra@stanford.edu.
9 However, please be aware that I tend to be extremely busy and to get a
10 lot of mail. I'll save your mail and get to it as soon as I can, but
11 depending on how busy I am it may take me a couple of months.
15 This module grew out of a thread on comp.lang.perl.misc where several of
16 us were throwing around different ways to print colored text from Perl
17 scripts and Zenin posted his old library to do that. I (Russ) disagreed
18 with the implementation and offered my own (the color() and colored()
19 functions implemented in this package), Zenin convinced me that the
20 constants had their place as well, and we started figuring out the best
21 ways of implementing both.
23 While ANSI color escape codes are fairly simple, it can be hard to
24 remember the codes for all of the attributes and the code resulting from
25 hard-coding them into your script is definitely difficult to read. This
26 module is designed to fix those problems, as well as provide a
27 convenient interface to do a few things for you automatically (like
28 resetting attributes after the text you print out so that you don't
29 accidentally leave attributes set).
31 Despite its name, this module can also handle non-color ANSI text
32 attributes (bold, underline, reverse video, and blink). It uses either
33 of two interfaces, one of which uses "constants" for each different
34 attribute and the other of which uses two subs which take strings of
35 attributes as arguments.
37 The most recent version of this module is available at its web site:
39 <http://www.eyrie.org/~eagle/software/ansicolor/>
41 See the POD documentation for complete details, features, and usage.
43 This module is distributed as part of the Perl core distribution as of
44 Perl 5.6.0. You only need to install this module if you want a newer
45 version than came with Perl or if you have an old version of Perl.
49 Follow the standard installation procedure for Perl modules, which is to
50 type the following commands:
57 You'll probably need to do the last as root. If instead you wish to
58 install the module by hand, simply copy it into a directory named Term
59 in your Perl library directory.
61 Note that make install, for Perl 5.6.0 or later, will replace the
62 Term::ANSIColor that came with Perl. You may wan to save a backup copy
63 of the standard version first.
67 To Jon Lennox for looking at early versions of this module, providing
68 feedback, and offering suggestions for improvement.
70 To Jesse Taylor for writing the first significant script to use this
71 module (colorized calsplit), thus offering innumerable opportunities to
74 To Jean Delvare for providing documentation of what the various
75 attributes do on various different terminal emulators, and for noting
76 that attribute 2 is dark.
78 To Edward Avis for the implementation of uncolor.
80 To Rani Pinchuk for the idea of ANSI_COLORS_DISABLED and an initial
83 To ATricket for the information about what PuTTY, Windows telnet, and
84 OpenSSH under Cygwin support.
86 To Richard Maus for pointing out DARK was missing from the exported
87 constants list and CYAN and WHITE were missing from the documentation.
89 To Autrijus Tang for noticing a problem with string comparisons in the
92 To Daniel Lindsley for the information about what Mac OS X Terminal
95 To Joe Smith for the test files that exercise a wide variety of VT100
96 escape sequences including the ECMA-48 color control codes.
98 To James Bowlin for catching a bug in colored when $EACHLINE is set that
99 caused it to not color lines consisting solely of 0.
101 To Larry Wall, as always, for Perl.