| Test-Run-Plugin-ColorFileVerdicts documentation | Contained in the Test-Run-Plugin-ColorFileVerdicts distribution. |
Test::Run::CmdLine::Plugin::ColorFileVerdicts - Color the individual test file verdicts in Test::Run::CmdLine.
0.0122
Returns the Backend Plugins as specified by this plugin. See Test::Run::CmdLine for more information.
Returns the non-direct Backend Environment Mappings, that will specify the YAML information. See Test::Run::CmdLine for more information.
Makes Test::Run::CmdLine process the PERL_HARNESS_VERDICT_COLORS
environment variable.
This environment variables specifies a mapping (or hash) where the keys are the verdict types and the values are the color strings (as understood by Term::ANSIColor). So for example to specify the color "magenta" for success and "blue" for failure use:
export PERL_HARNESS_VERDICT_COLORS="success=magenta;failure=blue"
As you can see the key/value pairs are separated with ";" and "=" is
used for the assignment.
Shlomi Fish, <shlomif at cpan.org>
Please report any bugs or feature requests to
bug-test-run-plugin-colorfileverdicts at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-Plugin-ColorFileVerdicts.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Test::Run::Plugin::ColorFileVerdicts
You can also look for information at:
http://cpanratings.perl.org/d/Test-Run-Plugin-ColorFileVerdicts
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Run-Plugin-ColorFileVerdicts
http://search.cpan.org/dist/Test-Run-Plugin-ColorFileVerdicts
Copyright 2007 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT X11
| Test-Run-Plugin-ColorFileVerdicts documentation | Contained in the Test-Run-Plugin-ColorFileVerdicts distribution. |
package Test::Run::CmdLine::Plugin::ColorFileVerdicts; use strict; use warnings;
our $VERSION = '0.0122';
sub private_backend_plugins { my $self = shift; return [qw(ColorFileVerdicts)]; }
sub private_non_direct_backend_env_mapping { my $self = shift; return [ { type => "varmap", env => "PERL_HARNESS_VERDICT_COLORS", arg => "individual_test_file_verdict_colors", }, ]; }
sub private_backend_args { my $self = shift; return $self->_get_file_verdicts_color_mappings(); }
sub _get_file_verdicts_color_mappings { my $self = shift; if (exists($ENV{PERL_HARNESS_VERDICT_COLORS})) { # FIXME my $mapping_string = $ENV{PERL_HARNESS_VERDICT_COLORS}; my @assignments = split(/\s*;\s*/, $mapping_string); return [ individual_test_file_verdict_colors => {map { /\A([^=]*)=(.*)\z/ms ? ($1 => $2) : () } @assignments} ]; } else { return []; } }