line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Run::CmdLine::Plugin::ColorSummary; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4655
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
160
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Test::Run::CmdLine::Plugin::ColorSummary - Color the summary in Test::Run::CmdLine. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.0201'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head2 $self->private_backend_plugins() |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Returns the Backend Plugins as specified by this plugin. See |
17
|
|
|
|
|
|
|
L<Test::Run::CmdLine> for more information. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub private_backend_plugins |
22
|
|
|
|
|
|
|
{ |
23
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return [qw(ColorSummary)]; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 $self->private_direct_backend_env_mapping() |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Returns the HARNESS_SUMMARY_COLOR_FAIL and HARNESS_SUMMARY_COLOR_SUCCESS |
31
|
|
|
|
|
|
|
environment variables. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub private_direct_backend_env_mapping |
36
|
|
|
|
|
|
|
{ |
37
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
return |
39
|
|
|
|
|
|
|
[ |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
|
|
|
'env' => "HARNESS_SUMMARY_COLOR_SUCCESS", |
42
|
|
|
|
|
|
|
'arg' => "summary_color_success", |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
{ |
45
|
|
|
|
|
|
|
'env' => "HARNESS_SUMMARY_COLOR_FAIL", |
46
|
|
|
|
|
|
|
'arg' => "summary_color_failure", |
47
|
|
|
|
|
|
|
}, |
48
|
|
|
|
|
|
|
]; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This plug-in colors the summary line in Test::Run::CmdLine. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 ENVIRONMENT VARIABLES |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This module accepts the followinge environment variables: |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=over 4 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item HARNESS_SUMMARY_COLOR_SUCCESS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This specifies the Term::ANSIColor color for the success line. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item HARNESS_SUMMARY_COLOR_FAIL |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This specifies the Term::ANSIColor color for the failure line |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=back |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Shlomi Fish, C<< <shlomif@iglu.org.il> >> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 BUGS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
78
|
|
|
|
|
|
|
C<bug-test-run-cmdline-plugin-colorsummary@rt.cpan.org>, or through the web interface at |
79
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine-Plugin-ColorSummary>. |
80
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
81
|
|
|
|
|
|
|
your bug as I make changes. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 SUPPORT |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
perldoc Test::Run::CmdLine::Plugin::ColorSummary |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
You can also look for information at: |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over 4 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Test::Run::CmdLine::Plugin::ColorSummary> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * CPAN Ratings |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Test::Run::CmdLine::Plugin::ColorSummary> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine::Plugin::ColorSummary> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * Search CPAN |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Test::Run::CmdLine::Plugin::ColorSummary/> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=back |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The latest source of Test::Run::CmdLine::Plugin::ColorSummary is available from the |
114
|
|
|
|
|
|
|
Test::Run BerliOS Subversion repository: |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L<https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 SEE ALSO |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
L<Test::Run::Obj>, L<Term::ANSIColor>, |
121
|
|
|
|
|
|
|
L<Test::Run::Plugin::ColorSummary>. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
Copyright 2006 Shlomi Fish, all rights reserved. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
This program is released under the following license: MIT X11. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
1; |
134
|
|
|
|
|
|
|
|