colorize::stderr - Colorize STDERR
This document describes version 0.002 of colorize::stderr (from Perl distribution colorize-stderr), released on 2020-03-21.
use colorize::stderr; warn "blah!"; # will be printed in yellow
If you want to customize color:
use colorize::stderr 'red on_white'; warn "blah!";
Use in command-line, nifty for debugging (making it easy to notice whether an output to terminal is to STDOUT or STDERR):
% perl -Mcolorize::stderr ...
This is a convenience wrapper over colorize::handle for colorizing STDERR.
Caveat: although this module provides unimport(), this code does not do what you expect it to do:
unimport()
{ 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:
no colorize::stderr
use colorize::stderr (); { colorize::stderr->import; warn "colored warning!"; colorize::stderr->unimport; } warn "back to uncolored";
Please visit the project's homepage at https://metacpan.org/release/colorize-stderr.
Source repository is at https://github.com/perlancar/perl-colorize-handle.
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.
colorize::handle
perlancar <perlancar@cpan.org>
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.
To install colorize::stderr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm colorize::stderr
CPAN shell
perl -MCPAN -e shell install colorize::stderr
For more information on module installation, please visit the detailed CPAN module installation guide.