Skip to content

Commit

Permalink
[doc] ANSIColor.pm: Improve Synopsis & Description
Browse files Browse the repository at this point in the history
- It always confused me if I can pass to multi-element arrayref to `colored` (and it turns out that I can but it's not easily mentioned in the docs)

- Add `C<>` where applicable in the Description
  • Loading branch information
rwp0 committed Nov 8, 2023
1 parent e81d29a commit 9cb0882
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions lib/Term/ANSIColor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ our $AUTOLOAD;
# against circular module loading (not that we load any modules, but
# consistency is good).
BEGIN {
$VERSION = '5.01';
$VERSION = '5.02';

# All of the basic supported constants, used in %EXPORT_TAGS.
my @colorlist = qw(
Expand Down Expand Up @@ -653,7 +653,7 @@ undef CLICOLOR NNN GGG RRR
print "This text is normal.\n";
print colored(['yellow on_magenta'], 'Yellow on magenta.', "\n");
print colored(['red on_bright_yellow'], 'Red on bright yellow.', "\n");
print colored(['bright_red on_black'], 'Bright red on black.', "\n");
print colored(['bright_red', 'on_black'], 'Bright red on black.', "\n");
print "\n";
# Map escape sequences back to color names.
Expand Down Expand Up @@ -702,15 +702,16 @@ undef CLICOLOR NNN GGG RRR
=head1 DESCRIPTION
This module has two interfaces, one through color() and colored() and the
other through constants. It also offers the utility functions uncolor(),
colorstrip(), colorvalid(), and coloralias(), which have to be explicitly
imported to be used (see L</SYNOPSIS>).
This module has two interfaces, one through C<color()> and C<colored()>,
and the other through constants. It also offers the utility functions
C<uncolor()>, C<colorstrip()>, C<colorvalid()>, and C<coloralias()>,
which have to be explicitly imported to be used (see L</SYNOPSIS>).
If you are using Term::ANSIColor in a console command, consider supporting the
CLICOLOR standard. See L</"Supporting CLICOLOR"> for more information.
If you are using C<Term::ANSIColor> in a console command, consider supporting
the C<CLICOLOR> standard.
See L</"Supporting CLICOLOR"> for more information.
See L</COMPATIBILITY> for the versions of Term::ANSIColor that introduced
See L</COMPATIBILITY> for the versions of C<Term::ANSIColor> that introduced
particular features and the versions of Perl that included them.
=head2 Supported Colors
Expand Down

0 comments on commit 9cb0882

Please sign in to comment.