Pod::Text::Color

(Convert POD data to formatted color ASCII text)

SYNOPSIS

    use Pod::Text::Color;
    my $parser = Pod::Text::Color->new (sentence => 0, width => 78);

    # Read POD from STDIN and write to STDOUT.
    $parser->parse_from_filehandle;

    # Read POD from file.pod and write to file.txt.
    $parser->parse_from_file ('file.pod', 'file.txt');

DESCRIPTION

Pod::Text::Color is a simple subclass of Pod::Text that highlights output text using ANSI color escape sequences. Apart from the color, it in all ways functions like Pod::Text. See Pod::Text for details and available options.

Term::ANSIColor is used to get colors and therefore must be installed to use this module.

COMPATIBILITY

Pod::Text::Color 0.05 (based on Pod::Parser) was the first version of this module included with Perl, in Perl 5.6.0.

The current API based on Pod::Simple was added in Pod::Text::Color 2.00. Pod::Text::Color 2.01 was included in Perl 5.9.3, the first version of Perl to incorporate those changes.

Several problems with wrapping and line length were fixed as recently as Pod::Text::Color 6.0.0.

This module inherits its API and most behavior from Pod::Text, so the details in "COMPATIBILITY" in Pod::Text also apply. Pod::Text and Pod::Text::Color have had the same module version since 4.00, included in Perl 5.23.7. (They unfortunately diverge in confusing ways prior to that.)

CAVEATS

Line wrapping is done only at ASCII spaces and tabs, rather than using a correct Unicode-aware line wrapping algorithm.

AUTHOR

Russ Allbery <rra@cpan.org>.

COPYRIGHT AND LICENSE

Copyright 1999, 2001, 2004, 2006, 2008, 2009, 2018-2019, 2022, 2024 Russ Allbery <rra@cpan.org>

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Pod::Text, Pod::Simple

The current version of this module is always available from its web site at <https://www.eyrie.org/~eagle/software/podlators/>. It is also part of the Perl core distribution as of 5.6.0.

Last modified and spun 2024-07-14