Created
August 5, 2011 22:32
-
-
Save tadzik/1128691 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[tadzik@yavin4]─[~/src/nom] (nom) | |
└─[%]─> cat foo.pl | |
#= Color screen output using ANSI escape sequences | |
module Term::ANSIColor; | |
#= emit ANSI sequence for the given string of attributes | |
sub color (Str $what) is export { ... } | |
#= color the text according to the description | |
sub colored (Str $what, Str $how) is export { ... } | |
#= is the color valid? | |
sub colorvalid (*@a) is export { ... } | |
#= string colors from the string | |
sub colorstrip (*@a) is export { ... } | |
#= transform ANSI sequences into their string descriptions | |
sub uncolor (Str $what) is export { ... } | |
DOC INIT { | |
use Pod::To::Text; | |
print pod2text($=POD) | |
} | |
┌─[tadzik@yavin4]─[~/src/nom] (nom) | |
└─[%]─> ./perl6 --doc foo.pl | |
sub color: emit ANSI sequence for the given string of attributes | |
sub colored: color the text according to the description | |
sub colorvalid: is the color valid? | |
sub colorstrip: string colors from the string | |
sub uncolor: transform ANSI sequences into their string descriptions | |
module Term::ANSIColor: Color screen output using ANSI escape sequences |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment