/
visitcpan
executable file
·258 lines (160 loc) · 7.14 KB
/
visitcpan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#!/usr/bin/env perl
use strict;
use warnings;
use version; our $VERSION = '0.004';
require App::CPAN::Mini::Visit;
exit App::CPAN::Mini::Visit->run(@ARGV);
__END__
=begin wikidoc
= NAME
visitcpan - explore each distribution in a minicpan repository
= VERSION
This documentation refers to %%VERSION%%.
= SYNOPSIS
$ visitcpan [OPTIONS] [PROGRAM]
$ visitcpan [OPTIONS] -- [PROGRAM] [ARGS]
= DESCRIPTION
This program executes other programs against each distribution in a minicpan
repository. Given a program to run, for each distribution archive in the
repository, it will:
* extract the distribution archive to a temporary directory
* change to the temporary directory
* execute the user-specified program
* return to the original directory
* clean up the temporary directory
If no program to run is provided, {visitcpan} will instead produce a listing of
distribution files, one per line, that can be piped to other programs for
analysis.
To avoid conflicts between {visitcpan} options and arguments provided to
the program to run, use two dashes ('--') to separate minicpan options
from other arguments.
By default, {visitcpan} will use a local minicpan repository as defined
in a .minicpanrc file.
= OPTIONS
--append|-a --append=dist -> append distname after ARGS
--append=path -> append tarball path after ARGS
-e|-E run next argument via 'perl -E'
--help|-h this usage info
--minicpan|-m directory of a minicpan (defaults to local minicpan
from CPAN::Mini config file)
--output|-o file to save output instead of sending to terminal
--quiet|-q silence warnings and suppress STDERR from tar
--version|-V visitcpan program version
-- indicates the end of options for visitcpan
= EXAMPLES
# count number of distributiosn in the minicpan
$ visitcpan | wc -l
# get a listing of all distributions using Build.PL
$ visitcpan -q -a dist -o listing.txt -e 'say shift if -f "Build.PL"'
# run a program against each distribution
$ visitcpan -q -- ack -a 'use version;'
= BUGS
Please report any bugs or feature using the CPAN Request Tracker.
Bugs can be submitted through the web interface at
[http://rt.cpan.org/Dist/Display.html?Queue=App-CPAN-Mini-Visit]
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
[CPAN::Mini::Extract] creates a minicpan with archives extracted. Analyzing
an extracted tree will be faster than {visitcpan}, but the tree will take
up substantially more space on disk.
= AUTHOR
David A. Golden (DAGOLDEN)
= COPYRIGHT AND LICENSE
Copyright (c) 2008-2009 by David A. Golden
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
[http://www.apache.org/licenses/LICENSE-2.0]
Files produced as output though the use of this software, including
generated copies of boilerplate templates provided with this software,
shall not be considered Derivative Works, but shall be considered the
original work of the Licensor.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=end wikidoc
=cut
#--------------------------------------------------------------------------#
# Don't edit below here
#--------------------------------------------------------------------------#
# Generated by Pod::WikiDoc version 0.18
=pod
=head1 NAME
visitcpan - explore each distribution in a minicpan repository
=head1 VERSION
This documentation refers to 0.004.
=head1 SYNOPSIS
$ visitcpan [OPTIONS] [PROGRAM]
$ visitcpan [OPTIONS] -- [PROGRAM] [ARGS]
=head1 DESCRIPTION
This program executes other programs against each distribution in a minicpan
repository. Given a program to run, for each distribution archive in the
repository, it will:
=over
=item *
extract the distribution archive to a temporary directory
=item *
change to the temporary directory
=item *
execute the user-specified program
=item *
return to the original directory
=item *
clean up the temporary directory
=back
If no program to run is provided, C<<< visitcpan >>> will instead produce a listing of
distribution files, one per line, that can be piped to other programs for
analysis.
To avoid conflicts between C<<< visitcpan >>> options and arguments provided to
the program to run, use two dashes ('--') to separate minicpan options
from other arguments.
By default, C<<< visitcpan >>> will use a local minicpan repository as defined
in a .minicpanrc file.
=head1 OPTIONS
--append|-a --append=dist -> append distname after ARGS
--append=path -> append tarball path after ARGS
-e|-E run next argument via 'perl -E'
--help|-h this usage info
--minicpan|-m directory of a minicpan (defaults to local minicpan
from CPAN::Mini config file)
--output|-o file to save output instead of sending to terminal
--quiet|-q silence warnings and suppress STDERR from tar
--version|-V visitcpan program version
-- indicates the end of options for visitcpan
=head1 EXAMPLES
# count number of distributiosn in the minicpan
$ visitcpan | wc -l
# get a listing of all distributions using Build.PL
$ visitcpan -q -a dist -o listing.txt -e 'say shift if -f "Build.PL"'
# run a program against each distribution
$ visitcpan -q -- ack -a 'use version;'
=head1 BUGS
Please report any bugs or feature using the CPAN Request Tracker.
Bugs can be submitted through the web interface at
L<http://rt.cpan.org/Dist/Display.html?Queue=App-CPAN-Mini-Visit>
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.
=head1 SEE ALSO
L<CPAN::Mini::Extract> creates a minicpan with archives extracted. Analyzing
an extracted tree will be faster than C<<< visitcpan >>>, but the tree will take
up substantially more space on disk.
=head1 AUTHOR
David A. Golden (DAGOLDEN)
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2008-2009 by David A. Golden
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
L<http://www.apache.org/licenses/LICENSE-2.0>
Files produced as output though the use of this software, including
generated copies of boilerplate templates provided with this software,
shall not be considered Derivative Works, but shall be considered the
original work of the Licensor.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.