view release on metacpan or search on metacpan
lib/App/DocKnot/Generate.pm view on Meta::CPAN
# be influenced by App::DocKnot configuration in the future, but it currently
# doesn't use any configuration.
#
# Returns: Code reference to a closure that takes a block of text and returns
# the converted text
sub _code_for_to_text {
my ($self) = @_;
my $to_text = sub {
my ($text) = @_;
# Remove triple backticks but escape all backticks inside them.
$text =~ s{ ``` \w* (\s .*?) ``` }{
my $text = $1;
$text =~ s{ [\`] }{``}xmsg;
$text;
}xmsge;
# Remove backticks, but don't look at things starting with doubled
# backticks.
$text =~ s{ (?<! \` ) ` ([^\`]+) ` }{$1}xmsg;
lib/App/DocKnot/Generate.pm view on Meta::CPAN
# Returns: Code reference to a closure that takes a block of text and returns
# the converted thread
sub _code_for_to_thread {
my ($self) = @_;
my $to_thread = sub {
my ($text) = @_;
# Escape all backslashes.
$text =~ s{ \\ }{\\\\}xmsg;
# Rewrite triple backticks to \pre blocks and escape backticks inside
# them so that they're not turned into \code blocks.
$text =~ s{ ``` \w* (\s .*?) ``` }{
my $text = $1;
$text =~ s{ [\`] }{``}xmsg;
'\pre[' . $1 . ']';
}xmsge;
# Rewrite backticks to \code blocks.
$text =~ s{ ` ([^\`]+) ` }{\\code[$1]}xmsg;
lib/App/DocKnot/Spin/RSS.pm view on Meta::CPAN
##############################################################################
# Utility functions
##############################################################################
# Escapes &, <, and > characters for HTML or XML output.
#
# $string - Input string
#
# Returns: Escaped string
sub _escape {
my ($string) = @_;
$string =~ s{ & }{&}xmsg;
$string =~ s{ < }{<}xmsg;
$string =~ s{ > }{>}xmsg;
return $string;
}
# List intersection.
#
# $one - First list
lib/App/DocKnot/Spin/RSS.pm view on Meta::CPAN
my $name = $file->basename();
$url = $metadata_ref->{'rss-base'} . $name;
}
# Format the entries.
my @formatted_entries;
for my $entry_ref ($entries_ref->@*) {
my $date = $lang->strftime($format, [localtime($entry_ref->{date})]);
my $description;
if ($entry_ref->{description}) {
$description = _escape($entry_ref->{description});
$description =~ s{ ^ }{ }xmsg;
$description =~ s{ \A (\s*) }{$1<p>}xms;
$description =~ s{ \n* \z }{</p>\n}xms;
} elsif ($entry_ref->{journal}) {
my $path = path($entry_ref->{journal})->absolute($base);
$description = $self->_rss_journal($path);
} elsif ($entry_ref->{review}) {
my $path = path($entry_ref->{review})->absolute($base);
$description = $self->_rss_review($path);
}
lib/App/DocKnot/Spin/Sitemap.pm view on Meta::CPAN
close($fh);
return;
}
##############################################################################
# Utility methods
##############################################################################
# Escape a page description so that it can be put in HTML output.
#
# $desc - The string to escape
# $is_attr - If true, escape for putting in an HTML attribute
#
# Returns: $desc escaped so that it's safe to interpolate into an attribute
sub _escape {
my ($desc, $is_attr) = @_;
$desc =~ s{ & }{&}xmsg;
$desc =~ s{ < }{<}xmsg;
$desc =~ s{ > }{>}xmsg;
if ($is_attr) {
$desc =~ s{ \" }{"}xmsg;
}
return $desc;
}
lib/App/DocKnot/Spin/Sitemap.pm view on Meta::CPAN
} else {
return ('../' x $#origin) . join(q{/}, @dest);
}
}
# Return the link data for a given page.
#
# $path - Path to the output, relative to the top of the web site
#
# Returns: List of links, each of which is a tuple of the relative URL and
# the description (escaped for safe interpolation as an attribute).
# The relative URL and description may be undef if missing.
sub _page_links {
my ($self, $path) = @_;
my $key;
if ($path->basename() eq 'index.html') {
$key = $path->parent() . q{/};
} else {
$key = "$path";
}
lib/App/DocKnot/Spin/Sitemap.pm view on Meta::CPAN
# top of the site. Add the names of the link types.
my @types = qw(previous next up);
@links = @links[0 .. 2];
@links = pairwise { defined($b) ? [$a, $b->@*] : undef } @types, @links;
# Generate the HTML for those links.
my @output;
for my $link (@links) {
next unless defined($link);
my ($type, $url, $desc) = $link->@*;
$desc = _escape($desc, 1);
# Break the line if it would be longer than 79 characters.
my $line = qq{ <link rel="$type" href="$url"};
if (length($line) + length($desc) + 12 > 79) {
push(@output, $line . "\n");
$line = (q{ } x 8) . qq{title="$desc"};
} else {
$line .= qq{ title="$desc"};
}
push(@output, $line . " />\n");
lib/App/DocKnot/Spin/Sitemap.pm view on Meta::CPAN
# Returns: List of lines that create the navbar
sub navbar {
my ($self, $path) = @_;
my ($prev, $next, @parents) = $self->_page_links(path($path));
return () if !@parents;
# Construct the left and right links (previous and next).
my $prev_link = q{ <td class="navleft">};
if (defined($prev)) {
my ($url, $desc) = $prev->@*;
$desc = _escape($desc);
$prev_link .= qq{< <a href="$url">$desc</a>};
}
$prev_link .= "</td>\n";
my $next_link = q{ <td class="navright">};
if (defined($next)) {
my ($url, $desc) = $next->@*;
$desc = _escape($desc);
$next_link .= qq{<a href="$url">$desc</a> >};
}
$next_link .= "</td>\n";
# Construct the bread crumbs for the page hierarchy.
my @breadcrumbs = (" <td>\n");
my $first = 1;
for my $parent (reverse(@parents)) {
my ($url, $desc) = $parent->@*;
my $prefix = q{ } x 4;
lib/App/DocKnot/Spin/Text.pm view on Meta::CPAN
# Format a link. All whitespace in the link is treated as insignficant.
#
# $link - Link to format
#
# Returns: Link formatted as an HTML link, with the link anchor being the same
# as the link with any mailto: or news: removed.
sub _format_url {
my ($link) = @_;
my $text = $link;
$link = _smash(_unescape($link));
$text =~ s{ \A (?: mailto | news ): }{}xms;
return '<<a href="' . $link . '">' . $text . '</a>>';
}
# Looks for URLs in <> or <URL:...> form and wraps a link around it. Assumes
# that < and > have already been escaped.
#
# $text - Text to format
#
# Returns: Text with any embedded links turned into proper HTML links.
sub _format_urls {
my ($text) = @_;
$text =~ s{
< (?:URL:)? ([a-z]{2,}:.+?) >
}{
_format_url($1)
lib/App/DocKnot/Spin/Text.pm view on Meta::CPAN
#
# $string - Input string
#
# Returns: String with all whitespace removed.
sub _smash {
my ($string) = @_;
$string =~ s{ \s }{}xmsg;
return $string;
}
# Unescape &, <, and > characters.
#
# $text - Text to remove HTML escapes from.
#
# Returns: Text with HTML escapes changed back to their regular characters.
sub _unescape {
my ($text) = @_;
$text =~ s{ > }{>}xmsg;
$text =~ s{ < }{<}xmsg;
$text =~ s{ & }{&}xmsg;
return $text;
}
# Escapes &, <, and > characters found in a string.
sub escape { local $_ = shift; s/&/&/g; s/</</g; s/>/>/g; $_ }
# Returns the length of the indentation of a line or paragraph.
sub indent { $_[0] =~ /^(\s*)/; length $1 }
# Returns the number of lines in a paragraph, not counting trailing blanks.
sub lines { local $_ = shift; s/\s+$/\n/; tr/\n// }
# Returns a nicely formatted "Last modified" string from an RCS/CVS Id.
sub modified_id {
my $id = shift;
lib/App/DocKnot/Spin/Text.pm view on Meta::CPAN
# things that look like a heading unless they're outdented.
#
# Unlike most of the classification functions, this is a regular method, since
# it needs access to the parsing state.
#
# $paragraph - Paragraph to classify
#
# Returns: True if a heading, false otherwise
sub _is_heading {
my ($self, $paragraph) = @_;
$paragraph = _unescape($paragraph);
my $indent = indent($paragraph);
my $nobase = !defined($self->{baseline});
my $outdented = defined($self->{baseline}) && $indent < $self->{baseline};
# Numbered lines inside the contents section are definitely not headings.
my $numbered = $paragraph =~ m{ \A [\d.]+[.\)] \s }xms;
return if !$outdented && $self->{contents} && $numbered;
# Outdented single lines are headings as long as they're either short or
# contain at least two words.
lib/App/DocKnot/Spin/Text.pm view on Meta::CPAN
# For cases other than a rule or blank line, we have to either be in a
# subheading or the line must be centered.
last if !(@subheaders || _is_centered($line));
# A subheading to add. Replace Revision and Date keywords with our
# modified timestamp if we have one.
if ($modified && $line =~ m{ [\$] (?: Revision | Date ) }xms) {
push(@subheaders, $modified);
$modified = undef;
} else {
push(@subheaders, _format_urls(escape(whitechomp($line))));
}
}
$self->_buffer_line($line);
$self->_skip_blank_lines_and_rules();
# If there is no subheading, but we have an author from the file headings,
# create a subheading with that information.
if (!@subheaders && $header_ref->{author}) {
push(@subheaders, escape($header_ref->{author}));
if ($header_ref->{original}) {
push(
@subheaders,
'(originally by ' . escape($header_ref->{original}) . ')',
)
}
}
# If we have modification information and haven't output it yet, add that
# to the subheading.
if (defined($modified)) {
push(@subheaders, $modified);
}
lib/App/DocKnot/Spin/Text.pm view on Meta::CPAN
if (_is_divider $_) {
$self->{pre} = 0;
$self->_output(start(-1));
undef $INDENT;
($self->{whitespace}) = /\n(\s*)$/;
$_ = $self->_next_paragraph();
s/\n(\s*)$/\n/;
$space = $1;
if (s/^Subject:\s+//) {
$self->{contents} = /\bcontents\b/i;
$_ = escape $_;
if (/^([\d.]+)[.\)]\s/) {
$self->_output(
h2(container(qq(a name="S$1" id="S$1"), $_))
);
} else {
$self->_output(h2($_));
}
next;
}
}
# Treat lines of dash-type characters as rules.
if (_is_rule $_) {
$self->{pre} = 0;
($space) = /\n(\s*)$/;
$self->_output(start(-1), "<hr />\n");
undef $INDENT;
next
}
# Everything else needs to have special characters escaped. We don't
# do this earlier because if we want to allow < and > in rules, the
# escaping would make our lives miserable.
$_ = escape $_;
# Do this before untabification and stashing of trailing whitespace,
# but after escaping. Check to see if this paragraph looks like
# literal text. If so, we wrap it in <pre> and output it as is. As a
# special exception to our normal paragraph handling, this paragraph
# doesn't end until we find a literal blank line; this hack lets full
# diffs be included in a FAQ without confusing the parser.
if (_is_literal $_) {
if (/\n[ \t]+$/) { $_ .= $self->_next_paragraph(1) }
$self->_output(pre(strip_indent($_, $INDENT)));
lib/App/DocKnot/Spin/Thread.pm view on Meta::CPAN
##############################################################################
# Basic parsing
##############################################################################
# Escapes &, <, and > characters for HTML output.
#
# $string - Input string
#
# Returns: Escaped string
sub _escape {
my ($string) = @_;
$string =~ s{ & }{&}xmsg;
$string =~ s{ < }{<}xmsg;
$string =~ s{ > }{>}xmsg;
return $string;
}
# Wrap something in paragraph markers, being careful to get newlines right.
# Special-case a paragraph consisting entirely of <span> by turning it into a
# <p> with the same class.
lib/App/DocKnot/Spin/Thread.pm view on Meta::CPAN
# Parse the thread file a paragraph at a time. _split_paragraphs takes
# care of ensuring that each paragraph contains the complete value of a
# command argument.
#
# The stack of parsed input is maintained in $self->{input} and the file
# being parsed at any given point is $self->{input}[-1]. _cmd_include
# will push new file information into this stack, and we pop off the top
# element of the stack when we exhaust its paragraphs.
while ($self->{input}->@*) {
while (defined(my $para = pop($self->{input}[-1][0]->@*))) {
my $result = $self->_parse(_escape($para), 1);
$result =~ s{ \A (?:\s*\n)+ }{}xms;
if ($result !~ m{ \A \s* \z }xms) {
$self->_output($result);
}
}
pop($self->{input}->@*);
}
# Close open tags and print any deferred whitespace.
print_fh($out_fh, $out_path, $self->_block_end(), $self->{space});
lib/App/DocKnot/Spin/Thread.pm view on Meta::CPAN
=head1 THREAD LANGUAGE
=head2 Basic Syntax
A thread file is Unicode text with a blank line between paragraphs.
There is no need to explicitly mark paragraphs; paragraph boundaries will be
inferred from the blank line between them and the appropriate C<< <p> >> tags
will be added to the HTML output.
There is no need to escape any character except C<\> (which should be written
as C<\\>) and an unbalanced C<[> or C<]> (which should be written as
C<\entity[91]> or C<\entity[93]> respectively). Escaping C<[> or C<]> is not
necessary if the brackets are balanced within the paragraph, and therefore is
only rarely needed.
Commands begin with C<\>. For example, the command to insert a line break
(corresponding to the C<< <br> >> tag in HTML) is C<\break>. If the command
takes arguments, they are enclosed in square brackets after the command. If
there are multiple arguments, they are each enclosed in square brackets and
follow each other. Any amount of whitespace (but nothing else) is allowed
lib/App/DocKnot/Spin/Thread.pm view on Meta::CPAN
and then use a style sheet that changes the text color for class C<red>.
=item \entity[CODE]
An HTML entity with code CODE. This normally becomes C<&CODE;> or C<&#CODE;>
in the generated HTML, depending on whether CODE is entirely numeric.
Use C<\entity[91]> and C<\entity[93]> for unbalanced C<[> and C<]> characters,
respectively.
Thread source is UTF-8, so this command is normally only necessary to escape
unbalanced square brackets.
=item \image[URL][TEXT]
Insert an inline image. TEXT is the alt text for the image (which will be
displayed on non-graphical browsers). Height and width tags are added
automatically if the URL is a relative path name and the corresponding file
exists and is supported by the Perl module Image::Size.
=item \link[URL][TEXT]
t/data/generate/ansicolor/docknot.yaml view on Meta::CPAN
- name: docs
title: Module documentation
- name: thanks
title: Thanks and credits
blurb: |
Term::ANSIColor provides constants and simple functions for setting ANSI
text attributes, most notably colors. It can be used to set the current
text attributes or to apply a set of attributes to a string and reset the
current text attributes at the end of that string. Eight-color,
sixteen-color, and 256-color escape sequences are all supported.
description: |
This Perl module is a simple and convenient interface to the ANSI terminal
escape sequences for color (from ECMA-48, also included in ISO 6429). The
color sequences are provided in two forms, either as constants for each
color or via a function that takes the names of colors and returns the
appropriate escape codes or wraps them around the provided text. The
non-color text style codes from ANSI X3.64 (bold, dark, underline, and
reverse, for example), which were also included in ECMA-48 and ISO 6429,
are also supported. Also supported are the extended colors used for
sixteen-color and 256-color emulators.
This module is very stable, and I've used it in a wide variety of
applications. It has been included in the core Perl distribution starting
with version 5.6.0, so you don't need to download and install it yourself
unless you have an old version of Perl or need a newer version of the
module than comes with your version of Perl. I continue to maintain it as
t/data/generate/ansicolor/docknot.yaml view on Meta::CPAN
a combination of two approaches, one with constants by Zenin and one with
functions that I wrote. I offered to maintain a combined module that
included both approaches.
requirements: |
Term::ANSIColor is written in pure Perl and has no module dependencies
that aren't found in Perl core. It should work with any version of Perl
after 5.6, although it hasn't been tested with old versions in some time.
In order to actually see color, you will need to use a terminal window
that supports the ANSI escape sequences for color. Any recent version of
xterm, most xterm derivatives and replacements, and most telnet and ssh
clients for Windows and Macintosh should work, as will the MacOS X
Terminal application (although Terminal.app reportedly doesn't support 256
colors). The console windows for Windows NT and Windows 2000 will not
work, as they do not even attempt to support ANSI X3.64.
For a complete (to my current knowledge) compatibility list, see the
Term::ANSIColor module documentation. If you have any additions to the
table in the documentation, please send them to me.
t/data/generate/ansicolor/output/readme view on Meta::CPAN
<kstarsinic@gmail.com>. This software is distributed under the same
terms as Perl itself. Please see the section LICENSE below for more
information.
BLURB
Term::ANSIColor provides constants and simple functions for setting ANSI
text attributes, most notably colors. It can be used to set the current
text attributes or to apply a set of attributes to a string and reset
the current text attributes at the end of that string. Eight-color,
sixteen-color, and 256-color escape sequences are all supported.
DESCRIPTION
This Perl module is a simple and convenient interface to the ANSI
terminal escape sequences for color (from ECMA-48, also included in ISO
6429). The color sequences are provided in two forms, either as
constants for each color or via a function that takes the names of
colors and returns the appropriate escape codes or wraps them around the
provided text. The non-color text style codes from ANSI X3.64 (bold,
dark, underline, and reverse, for example), which were also included in
ECMA-48 and ISO 6429, are also supported. Also supported are the
extended colors used for sixteen-color and 256-color emulators.
This module is very stable, and I've used it in a wide variety of
applications. It has been included in the core Perl distribution
starting with version 5.6.0, so you don't need to download and install
it yourself unless you have an old version of Perl or need a newer
version of the module than comes with your version of Perl. I continue
t/data/generate/ansicolor/output/readme view on Meta::CPAN
that included both approaches.
REQUIREMENTS
Term::ANSIColor is written in pure Perl and has no module dependencies
that aren't found in Perl core. It should work with any version of Perl
after 5.6, although it hasn't been tested with old versions in some
time.
In order to actually see color, you will need to use a terminal window
that supports the ANSI escape sequences for color. Any recent version
of xterm, most xterm derivatives and replacements, and most telnet and
ssh clients for Windows and Macintosh should work, as will the MacOS X
Terminal application (although Terminal.app reportedly doesn't support
256 colors). The console windows for Windows NT and Windows 2000 will
not work, as they do not even attempt to support ANSI X3.64.
For a complete (to my current knowledge) compatibility list, see the
Term::ANSIColor module documentation. If you have any additions to the
table in the documentation, please send them to me.
t/data/generate/ansicolor/output/readme-md view on Meta::CPAN
<kstarsinic@gmail.com>. This software is distributed under the same terms
as Perl itself. Please see the section [License](#license) below for more
information.
## Blurb
Term::ANSIColor provides constants and simple functions for setting ANSI
text attributes, most notably colors. It can be used to set the current
text attributes or to apply a set of attributes to a string and reset the
current text attributes at the end of that string. Eight-color,
sixteen-color, and 256-color escape sequences are all supported.
## Description
This Perl module is a simple and convenient interface to the ANSI terminal
escape sequences for color (from ECMA-48, also included in ISO 6429). The
color sequences are provided in two forms, either as constants for each
color or via a function that takes the names of colors and returns the
appropriate escape codes or wraps them around the provided text. The
non-color text style codes from ANSI X3.64 (bold, dark, underline, and
reverse, for example), which were also included in ECMA-48 and ISO 6429,
are also supported. Also supported are the extended colors used for
sixteen-color and 256-color emulators.
This module is very stable, and I've used it in a wide variety of
applications. It has been included in the core Perl distribution starting
with version 5.6.0, so you don't need to download and install it yourself
unless you have an old version of Perl or need a newer version of the
module than comes with your version of Perl. I continue to maintain it as
t/data/generate/ansicolor/output/readme-md view on Meta::CPAN
functions that I wrote. I offered to maintain a combined module that
included both approaches.
## Requirements
Term::ANSIColor is written in pure Perl and has no module dependencies
that aren't found in Perl core. It should work with any version of Perl
after 5.6, although it hasn't been tested with old versions in some time.
In order to actually see color, you will need to use a terminal window
that supports the ANSI escape sequences for color. Any recent version of
xterm, most xterm derivatives and replacements, and most telnet and ssh
clients for Windows and Macintosh should work, as will the MacOS X
Terminal application (although Terminal.app reportedly doesn't support 256
colors). The console windows for Windows NT and Windows 2000 will not
work, as they do not even attempt to support ANSI X3.64.
For a complete (to my current knowledge) compatibility list, see the
Term::ANSIColor module documentation. If you have any additions to the
table in the documentation, please send them to me.
t/data/generate/ansicolor/output/thread view on Meta::CPAN
\link[https://git.eyrie.org/?p=perl/ansicolor.git]
[Git repository] \break
]
\h2[Blurb]
Term::ANSIColor provides constants and simple functions for setting ANSI
text attributes, most notably colors. It can be used to set the current
text attributes or to apply a set of attributes to a string and reset the
current text attributes at the end of that string. Eight-color,
sixteen-color, and 256-color escape sequences are all supported.
\h2[Description]
This Perl module is a simple and convenient interface to the ANSI terminal
escape sequences for color (from ECMA-48, also included in ISO 6429). The
color sequences are provided in two forms, either as constants for each
color or via a function that takes the names of colors and returns the
appropriate escape codes or wraps them around the provided text. The
non-color text style codes from ANSI X3.64 (bold, dark, underline, and
reverse, for example), which were also included in ECMA-48 and ISO 6429,
are also supported. Also supported are the extended colors used for
sixteen-color and 256-color emulators.
This module is very stable, and I've used it in a wide variety of
applications. It has been included in the core Perl distribution starting
with version 5.6.0, so you don't need to download and install it yourself
unless you have an old version of Perl or need a newer version of the
module than comes with your version of Perl. I continue to maintain it as
t/data/generate/ansicolor/output/thread view on Meta::CPAN
functions that I wrote. I offered to maintain a combined module that
included both approaches.
\h2[Requirements]
Term::ANSIColor is written in pure Perl and has no module dependencies
that aren't found in Perl core. It should work with any version of Perl
after 5.6, although it hasn't been tested with old versions in some time.
In order to actually see color, you will need to use a terminal window
that supports the ANSI escape sequences for color. Any recent version of
xterm, most xterm derivatives and replacements, and most telnet and ssh
clients for Windows and Macintosh should work, as will the MacOS X
Terminal application (although Terminal.app reportedly doesn't support 256
colors). The console windows for Windows NT and Windows 2000 will not
work, as they do not even attempt to support ANSI X3.64.
For a complete (to my current knowledge) compatibility list, see the
Term::ANSIColor module documentation. If you have any additions to the
table in the documentation, please send them to me.
t/data/spin/input/software/index.th view on Meta::CPAN
\package[mdfrm/][mdfrm]
[Summarize the content of a maildir like frm]
]
\section[perl][Perl Modules][
\package[pgp-sign/][PGP::Sign]
[Generate and/or verify detached PGP signatures]
\package[podlators/][podlators]
[Pod::Man and Pod::Text POD formatting modules]
\package[ansicolor/][Term::ANSIColor]
[Easy interface for ANSI color escape sequences]
\package[shadowhash/][Tie::ShadowHash]
[Overlay multiple hashes to form a single logical hash]
]
\section[devel][Software Development][
\package[c-tap-harness/][C TAP Harness]
[C harness for running TAP-compliant tests]
\package[cvslog/][cvslog]
[Featureful e-mail commit notification from CVS]
\package[docknot/][DocKnot]
t/data/spin/output/software/index.html view on Meta::CPAN
<td>Generate and/or verify detached PGP signatures</td>
</tr>
<tr>
<td class="package"><strong><a href="podlators/">podlators</a></strong></td>
<td>Pod::Man and Pod::Text POD formatting modules</td>
</tr>
<tr>
<td class="package"><strong><a href="ansicolor/">Term::ANSIColor</a></strong></td>
<td>Easy interface for ANSI color escape sequences</td>
</tr>
<tr>
<td class="package"><strong><a href="shadowhash/">Tie::ShadowHash</a></strong></td>
<td>Overlay multiple hashes to form a single logical hash</td>
</tr></table>
<h2 id="devel"><a name="devel">Software Development</a></h2>
<table class="software">
<tr>
t/data/update/ansicolor/docknot.yaml view on Meta::CPAN
---
blurb: |
Term::ANSIColor provides constants and simple functions for setting ANSI
text attributes, most notably colors. It can be used to set the current
text attributes or to apply a set of attributes to a string and reset the
current text attributes at the end of that string. Eight-color,
sixteen-color, and 256-color escape sequences are all supported.
build:
type: ExtUtils::MakeMaker
copyrights:
- holder: Russ Allbery <rra@cpan.org>
years: 1996-1998, 2000-2002, 2005-2006, 2008-2016
- holder: Zenin
years: '1996'
- holder: Kurt Starsinic <kstarsinic@gmail.com>
years: '2012'
description: |
This Perl module is a simple and convenient interface to the ANSI terminal
escape sequences for color (from ECMA-48, also included in ISO 6429). The
color sequences are provided in two forms, either as constants for each
color or via a function that takes the names of colors and returns the
appropriate escape codes or wraps them around the provided text. The
non-color text style codes from ANSI X3.64 (bold, dark, underline, and
reverse, for example), which were also included in ECMA-48 and ISO 6429,
are also supported. Also supported are the extended colors used for
sixteen-color and 256-color emulators.
This module is very stable, and I've used it in a wide variety of
applications. It has been included in the core Perl distribution starting
with version 5.6.0, so you don't need to download and install it yourself
unless you have an old version of Perl or need a newer version of the
module than comes with your version of Perl. I continue to maintain it as
t/data/update/ansicolor/docknot.yaml view on Meta::CPAN
quote:
author: Dave van Domelen
text: |
Ah, September, when the sysadmins turn colors and fall off the trees....
requirements: |
Term::ANSIColor is written in pure Perl and has no module dependencies
that aren't found in Perl core. It should work with any version of Perl
after 5.6, although it hasn't been tested with old versions in some time.
In order to actually see color, you will need to use a terminal window
that supports the ANSI escape sequences for color. Any recent version of
xterm, most xterm derivatives and replacements, and most telnet and ssh
clients for Windows and Macintosh should work, as will the MacOS X
Terminal application (although Terminal.app reportedly doesn't support 256
colors). The console windows for Windows NT and Windows 2000 will not
work, as they do not even attempt to support ANSI X3.64.
For a complete (to my current knowledge) compatibility list, see the
Term::ANSIColor module documentation. If you have any additions to the
table in the documentation, please send them to me.
t/data/update/ansicolor/old/blurb view on Meta::CPAN
Term::ANSIColor provides constants and simple functions for setting ANSI
text attributes, most notably colors. It can be used to set the current
text attributes or to apply a set of attributes to a string and reset the
current text attributes at the end of that string. Eight-color,
sixteen-color, and 256-color escape sequences are all supported.
t/data/update/ansicolor/old/description view on Meta::CPAN
This Perl module is a simple and convenient interface to the ANSI terminal
escape sequences for color (from ECMA-48, also included in ISO 6429). The
color sequences are provided in two forms, either as constants for each
color or via a function that takes the names of colors and returns the
appropriate escape codes or wraps them around the provided text. The
non-color text style codes from ANSI X3.64 (bold, dark, underline, and
reverse, for example), which were also included in ECMA-48 and ISO 6429,
are also supported. Also supported are the extended colors used for
sixteen-color and 256-color emulators.
This module is very stable, and I've used it in a wide variety of
applications. It has been included in the core Perl distribution starting
with version 5.6.0, so you don't need to download and install it yourself
unless you have an old version of Perl or need a newer version of the
module than comes with your version of Perl. I continue to maintain it as
t/data/update/ansicolor/old/requirements view on Meta::CPAN
Term::ANSIColor is written in pure Perl and has no module dependencies
that aren't found in Perl core. It should work with any version of Perl
after 5.6, although it hasn't been tested with old versions in some time.
In order to actually see color, you will need to use a terminal window
that supports the ANSI escape sequences for color. Any recent version of
xterm, most xterm derivatives and replacements, and most telnet and ssh
clients for Windows and Macintosh should work, as will the MacOS X
Terminal application (although Terminal.app reportedly doesn't support 256
colors). The console windows for Windows NT and Windows 2000 will not
work, as they do not even attempt to support ANSI X3.64.
For a complete (to my current knowledge) compatibility list, see the
Term::ANSIColor module documentation. If you have any additions to the
table in the documentation, please send them to me.