NAME
colorize::handle - Colorize a filehandle
VERSION
This document describes version 0.002 of colorize::handle (from Perl distribution colorize-stderr), released on 2020-03-21.
SYNOPSIS
use colorize::handle \*STDERR, "yellow";
Also see the more convenient subclass colorize::stderr for colorizing STDERR.
DESCRIPTION
This is a thin wrapper over PerlIO::via::ANSIColor.
Caveat: although this module provides unimport()
, this code does not do what you expect it to do:
{
use colorize::stderr;
warn "colored warning!";
}
warn "back to uncolored";
Because no colorize::stderr
will be run at compile-time. You can do this though:
use colorize::stderr ();
{
colorize::stderr->import;
warn "colored warning!";
colorize::stderr->unimport;
}
warn "back to uncolored";
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/colorize-stderr.
SOURCE
Source repository is at https://github.com/perlancar/perl-colorize-handle.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=colorize-stderr
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2020, 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.