Commit | Line | Data |
51da1d85 |
1 | Term::ANSIColor version 1.10 |
2d1e314f |
2 | (A simple ANSI text attribute control module) |
110e9fb0 |
3 | |
51da1d85 |
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. |
2d1e314f |
7 | |
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. |
110e9fb0 |
12 | |
110e9fb0 |
13 | INTRODUCTION |
14 | |
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. |
22 | |
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 |
2d1e314f |
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). |
110e9fb0 |
30 | |
31 | Despite its name, this module can also handle non-color ANSI text |
2d1e314f |
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. |
36 | |
37 | The most recent version of this module is available at its web site: |
38 | |
39 | <http://www.eyrie.org/~eagle/software/ansicolor/> |
110e9fb0 |
40 | |
41 | See the POD documentation for complete details, features, and usage. |
42 | |
2d1e314f |
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. |
46 | |
110e9fb0 |
47 | INSTALLATION |
48 | |
49 | Follow the standard installation procedure for Perl modules, which is to |
50 | type the following commands: |
51 | |
2d1e314f |
52 | perl Makefile.PL |
53 | make |
54 | make test |
55 | make install |
110e9fb0 |
56 | |
57 | You'll probably need to do the last as root. If instead you wish to |
2d1e314f |
58 | install the module by hand, simply copy it into a directory named Term |
59 | in your Perl library directory. |
110e9fb0 |
60 | |
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. |
64 | |
110e9fb0 |
65 | THANKS |
66 | |
67 | To Jon Lennox for looking at early versions of this module, providing |
68 | feedback, and offering suggestions for improvement. |
69 | |
70 | To Jesse Taylor for writing the first significant script to use this |
71 | module (colorized calsplit), thus offering innumerable opportunities to |
72 | test and debug. |
73 | |
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. |
77 | |
78 | To Edward Avis for the implementation of uncolor. |
79 | |
80 | To Rani Pinchuk for the idea of ANSI_COLORS_DISABLED and an initial |
81 | implementation. |
82 | |
2d1e314f |
83 | To ATricket for the information about what PuTTY, Windows telnet, and |
84 | OpenSSH under Cygwin support. |
110e9fb0 |
85 | |
2e589669 |
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. |
88 | |
92c7d2a2 |
89 | To Autrijus Tang for noticing a problem with string comparisons in the |
90 | test suite. |
91 | |
92 | To Daniel Lindsley for the information about what Mac OS X Terminal |
93 | supports. |
94 | |
51da1d85 |
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. |
97 | |
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. |
100 | |
2d1e314f |
101 | To Larry Wall, as always, for Perl. |