Getopt::Yath::Term(3)

NAME
Getopt::Yath::Term - Terminal utility methods

DESCRIPTION
Functions for manipulating text intended for the terminal.

SYNOPSIS
    use Getopt::Yath::Term qw{
        USE_COLOR
        color
        fit_to_width
        term_size
    };

EXPORTS

$bool = USE_COLOR()
    True if color can/should be used.

$ansi_escape = color($color_name)
    Get the ANSI escape sequence for the specified color, or return an empty string if color cannot be used.

$new_text = fit_to_width($join, $text, %params)
    Wrap text to fit nicely in the terminal. $join is the string used to join words (typically " "). $text is a string (split on whitespace) or an arrayref of parts. Supported params:

    prefix => $string
        A string to prepend to each output line (e.g., " " for indentation).

    width => $columns
        Target width in columns. Defaults to the terminal width minus 20, with a minimum of 80.

$cols = term_size()
    Get the width of the terminal in columns.

SOURCE
The source code repository for Getopt-Yath can be found at <http://github.com/Test-More/Getopt-Yath/>.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.

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

See <http://dev.perl.org/licenses/>