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