line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!perl |
2
|
|
|
|
|
|
|
package App::Prove::Plugin::Test::OnlySomeP; |
3
|
2
|
|
|
2
|
|
20918
|
use 5.012; |
|
2
|
|
|
|
|
15
|
|
4
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
64
|
|
5
|
2
|
|
|
2
|
|
18
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
100
|
|
6
|
2
|
|
|
2
|
|
11
|
use Carp qw(croak); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
260
|
|
7
|
2
|
|
|
2
|
|
19
|
use Test::OnlySome::PathCapsule; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
136
|
|
8
|
|
|
|
|
|
|
#use Data::Dumper; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.001003'; |
11
|
2
|
|
|
2
|
|
17
|
use constant DEFAULT_FILENAME => '.onlysome.yml'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
605
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $Filename; # The output filename to use, where the formatter can read it. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# TODO someday: find a cleaner way to pass the filename to the formatter. I am |
16
|
|
|
|
|
|
|
# not instantiating the formatter here because I don't want to remove |
17
|
|
|
|
|
|
|
# prove(1)'s control of the formatter options. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# Docs {{{3 |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
App::Prove::Plugin::Test::OnlySomeP - prove plugin supporting Test::OnlySome |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 INSTALLATION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
See L, with which this module is distributed. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
prove -PTest::OnlySomeP |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
This will save the test results in a form usable by Test::OnlySome::*. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# }}}3 |
38
|
|
|
|
|
|
|
# Caller-facing routines {{{1 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 EXPORTS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 load |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
The entry point for the plugin. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub load { |
49
|
6
|
|
|
6
|
1
|
64516
|
my ($class, $prove) = @_; |
50
|
6
|
|
|
|
|
20
|
my %args = @{ $prove->{args} }; |
|
6
|
|
|
|
|
29
|
|
51
|
6
|
|
|
|
|
234
|
print STDERR '# ', __PACKAGE__, " $VERSION loading\n"; # " with args ", Dumper(\%args), "\n"; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
$Filename = Test::OnlySome::PathCapsule->new( |
54
|
6
|
|
50
|
|
|
156
|
$args{filename} // DEFAULT_FILENAME |
55
|
|
|
|
|
|
|
)->abs(); |
56
|
|
|
|
|
|
|
#print STDERR "# OnlySomeP: Output filename is $Filename\n"; # DEBUG |
57
|
6
|
|
|
|
|
163
|
$prove->{app_prove}->formatter('App::Prove::Plugin::Test::OnlySomeP::Formatter'); |
58
|
|
|
|
|
|
|
} #load() |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# }}}1 |
61
|
|
|
|
|
|
|
# More docs {{{3 |
62
|
|
|
|
|
|
|
=head1 AUTHOR |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Christopher White, C<< >> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 BUGS |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Please report any bugs or feature requests on GitHub, at |
69
|
|
|
|
|
|
|
L. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 SUPPORT |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
perldoc Test::OnlySome |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
You can also look for information at: |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=over 4 |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item * The GitHub repository |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
L |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
L |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item * CPAN Ratings |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
L |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * Search CPAN |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=back |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# }}}3 |
106
|
|
|
|
|
|
|
# License {{{3 |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Thanks to sugyan for L, which provided inspiration. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Copyright 2018 Christopher White. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
This program is distributed under the MIT (X11) License: |
117
|
|
|
|
|
|
|
L |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person |
120
|
|
|
|
|
|
|
obtaining a copy of this software and associated documentation |
121
|
|
|
|
|
|
|
files (the "Software"), to deal in the Software without |
122
|
|
|
|
|
|
|
restriction, including without limitation the rights to use, |
123
|
|
|
|
|
|
|
copy, modify, merge, publish, distribute, sublicense, and/or sell |
124
|
|
|
|
|
|
|
copies of the Software, and to permit persons to whom the |
125
|
|
|
|
|
|
|
Software is furnished to do so, subject to the following |
126
|
|
|
|
|
|
|
conditions: |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be |
129
|
|
|
|
|
|
|
included in all copies or substantial portions of the Software. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
132
|
|
|
|
|
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
133
|
|
|
|
|
|
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
134
|
|
|
|
|
|
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
135
|
|
|
|
|
|
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
136
|
|
|
|
|
|
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
137
|
|
|
|
|
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
138
|
|
|
|
|
|
|
OTHER DEALINGS IN THE SOFTWARE. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=cut |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
# }}}3 |
143
|
|
|
|
|
|
|
1; |
144
|
|
|
|
|
|
|
# vi: set fdm=marker fdl=2: # |