Imported Upstream version 1.111013
gregor herrmann
10 years ago
0 | 0 | Revision history for CPAN-Mini |
1 | ||
2 | 1.111013 2013-04-13 14:02:58 Europe/London | |
3 | make www.cpan.org the default remote! | |
4 | ||
5 | link to the list of mirrors, too (thanks, SYSMON!) | |
6 | ||
7 | pass all options from command line, not just known ones (thanks, | |
8 | Jeffrey Thalhammer, who waited a very very long time for me to apply | |
9 | this!) | |
10 | ||
11 | add --remote-from option to get remote from CPAN or CPANPLUS config | |
12 | (thanks, Jeff Bisbee, who also waited a long time) | |
13 | ||
14 | expand leading "~" in config file name (suggested by justincase) | |
15 | ||
16 | die if local target isn't writable (suggested by SARGIE) | |
17 | ||
18 | 1.111012 2013-03-28 16:32:58 America/New_York | |
19 | when testing, mock my_home harder (thanks, David Golden!) | |
20 | ||
21 | 1.111011 2013-02-07 16:40:23 America/New_York | |
22 | check that the received 02packages seems at least remotely plausible | |
23 | ||
24 | 1.111010 2012-10-24 10:46:35 America/New_York | |
25 | fix the old ->trace method, broken in 1.111004 | |
26 | ||
27 | 1.111009 2012-08-27 21:32:39 America/New_York | |
28 | config options that once had to be specified as multiple entries | |
29 | on one line may now be given as repeated entries; these are | |
30 | also_mirror, module_filters, and path_filters | |
1 | 31 | |
2 | 32 | 1.111008 2011-12-23 13:36:41 America/New_York |
3 | 33 | don't fail tests when the outside env has set CPAN_MINI_CONFIG |
9 | 9 | dist.ini |
10 | 10 | lib/CPAN/Mini.pm |
11 | 11 | lib/CPAN/Mini/App.pm |
12 | t/00-compile.t | |
12 | 13 | t/00-load.t |
14 | t/000-report-versions-tiny.t | |
13 | 15 | t/app.t |
14 | 16 | t/config-file.t |
15 | 17 | t/filter.t |
16 | t/release-pod-syntax.t | |
17 | 18 | xt/fake.t |
19 | xt/release/changes_has_content.t | |
20 | xt/release/pod-syntax.t |
4 | 4 | "Randal Schwartz <merlyn@stonehenge.com>" |
5 | 5 | ], |
6 | 6 | "dynamic_config" : 0, |
7 | "generated_by" : "Dist::Zilla version 4.300005, CPAN::Meta::Converter version 2.112621", | |
7 | "generated_by" : "Dist::Zilla version 4.300033, CPAN::Meta::Converter version 2.130880", | |
8 | 8 | "license" : [ |
9 | 9 | "perl_5" |
10 | 10 | ], |
19 | 19 | "ExtUtils::MakeMaker" : "6.30" |
20 | 20 | } |
21 | 21 | }, |
22 | "develop" : { | |
23 | "requires" : { | |
24 | "Test::Pod" : "1.41", | |
25 | "version" : "0.9901" | |
26 | } | |
27 | }, | |
22 | 28 | "runtime" : { |
23 | 29 | "requires" : { |
24 | "Carp" : 0, | |
30 | "CPAN" : "0", | |
31 | "CPANPLUS::Backend" : "0", | |
32 | "Carp" : "0", | |
25 | 33 | "Compress::Zlib" : "1.20", |
26 | "File::Basename" : 0, | |
27 | "File::Copy" : 0, | |
28 | "File::Find" : 0, | |
34 | "File::Basename" : "0", | |
35 | "File::Copy" : "0", | |
36 | "File::Find" : "0", | |
29 | 37 | "File::HomeDir" : "0.57", |
30 | 38 | "File::Path" : "2.04", |
31 | "File::Spec" : 0, | |
32 | "File::Temp" : 0, | |
33 | "Getopt::Long" : 0, | |
39 | "File::Spec" : "0", | |
40 | "File::Temp" : "0", | |
41 | "Getopt::Long" : "0", | |
34 | 42 | "LWP::UserAgent" : "5", |
35 | 43 | "Pod::Usage" : "1.00", |
36 | 44 | "URI" : "1", |
37 | 45 | "perl" : "5.006", |
38 | "strict" : 0, | |
39 | "warnings" : 0 | |
46 | "strict" : "0", | |
47 | "warnings" : "0" | |
40 | 48 | } |
41 | 49 | }, |
42 | 50 | "test" : { |
54 | 62 | "web" : "https://github.com/rjbs/cpan-mini" |
55 | 63 | } |
56 | 64 | }, |
57 | "version" : "1.111008", | |
65 | "version" : "1.111013", | |
58 | 66 | "x_Dist_Zilla" : { |
67 | "perl" : { | |
68 | "version" : "5.017010" | |
69 | }, | |
59 | 70 | "plugins" : [ |
71 | { | |
72 | "class" : "Dist::Zilla::Plugin::Git::GatherDir", | |
73 | "name" : "@RJBS/Git::GatherDir", | |
74 | "version" : "2.012" | |
75 | }, | |
60 | 76 | { |
61 | 77 | "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", |
62 | 78 | "name" : "@RJBS/CheckPrereqsIndexed", |
63 | "version" : "0.007" | |
64 | }, | |
65 | { | |
66 | "class" : "Dist::Zilla::Plugin::GatherDir", | |
67 | "name" : "@RJBS/@Basic/GatherDir", | |
68 | "version" : "4.300005" | |
79 | "version" : "0.008" | |
80 | }, | |
81 | { | |
82 | "class" : "Dist::Zilla::Plugin::CheckExtraTests", | |
83 | "name" : "@RJBS/CheckExtraTests", | |
84 | "version" : "0.011" | |
69 | 85 | }, |
70 | 86 | { |
71 | 87 | "class" : "Dist::Zilla::Plugin::PruneCruft", |
72 | "name" : "@RJBS/@Basic/PruneCruft", | |
73 | "version" : "4.300005" | |
88 | "name" : "@RJBS/@Filter/PruneCruft", | |
89 | "version" : "4.300033" | |
74 | 90 | }, |
75 | 91 | { |
76 | 92 | "class" : "Dist::Zilla::Plugin::ManifestSkip", |
77 | "name" : "@RJBS/@Basic/ManifestSkip", | |
78 | "version" : "4.300005" | |
93 | "name" : "@RJBS/@Filter/ManifestSkip", | |
94 | "version" : "4.300033" | |
79 | 95 | }, |
80 | 96 | { |
81 | 97 | "class" : "Dist::Zilla::Plugin::MetaYAML", |
82 | "name" : "@RJBS/@Basic/MetaYAML", | |
83 | "version" : "4.300005" | |
98 | "name" : "@RJBS/@Filter/MetaYAML", | |
99 | "version" : "4.300033" | |
84 | 100 | }, |
85 | 101 | { |
86 | 102 | "class" : "Dist::Zilla::Plugin::License", |
87 | "name" : "@RJBS/@Basic/License", | |
88 | "version" : "4.300005" | |
103 | "name" : "@RJBS/@Filter/License", | |
104 | "version" : "4.300033" | |
89 | 105 | }, |
90 | 106 | { |
91 | 107 | "class" : "Dist::Zilla::Plugin::Readme", |
92 | "name" : "@RJBS/@Basic/Readme", | |
93 | "version" : "4.300005" | |
94 | }, | |
95 | { | |
96 | "class" : "Dist::Zilla::Plugin::ExtraTests", | |
97 | "name" : "@RJBS/@Basic/ExtraTests", | |
98 | "version" : "4.300005" | |
108 | "name" : "@RJBS/@Filter/Readme", | |
109 | "version" : "4.300033" | |
99 | 110 | }, |
100 | 111 | { |
101 | 112 | "class" : "Dist::Zilla::Plugin::ExecDir", |
102 | "name" : "@RJBS/@Basic/ExecDir", | |
103 | "version" : "4.300005" | |
113 | "name" : "@RJBS/@Filter/ExecDir", | |
114 | "version" : "4.300033" | |
104 | 115 | }, |
105 | 116 | { |
106 | 117 | "class" : "Dist::Zilla::Plugin::ShareDir", |
107 | "name" : "@RJBS/@Basic/ShareDir", | |
108 | "version" : "4.300005" | |
118 | "name" : "@RJBS/@Filter/ShareDir", | |
119 | "version" : "4.300033" | |
109 | 120 | }, |
110 | 121 | { |
111 | 122 | "class" : "Dist::Zilla::Plugin::MakeMaker", |
112 | "name" : "@RJBS/@Basic/MakeMaker", | |
113 | "version" : "4.300005" | |
123 | "name" : "@RJBS/@Filter/MakeMaker", | |
124 | "version" : "4.300033" | |
114 | 125 | }, |
115 | 126 | { |
116 | 127 | "class" : "Dist::Zilla::Plugin::Manifest", |
117 | "name" : "@RJBS/@Basic/Manifest", | |
118 | "version" : "4.300005" | |
128 | "name" : "@RJBS/@Filter/Manifest", | |
129 | "version" : "4.300033" | |
119 | 130 | }, |
120 | 131 | { |
121 | 132 | "class" : "Dist::Zilla::Plugin::TestRelease", |
122 | "name" : "@RJBS/@Basic/TestRelease", | |
123 | "version" : "4.300005" | |
133 | "name" : "@RJBS/@Filter/TestRelease", | |
134 | "version" : "4.300033" | |
124 | 135 | }, |
125 | 136 | { |
126 | 137 | "class" : "Dist::Zilla::Plugin::ConfirmRelease", |
127 | "name" : "@RJBS/@Basic/ConfirmRelease", | |
128 | "version" : "4.300005" | |
138 | "name" : "@RJBS/@Filter/ConfirmRelease", | |
139 | "version" : "4.300033" | |
129 | 140 | }, |
130 | 141 | { |
131 | 142 | "class" : "Dist::Zilla::Plugin::UploadToCPAN", |
132 | "name" : "@RJBS/@Basic/UploadToCPAN", | |
133 | "version" : "4.300005" | |
143 | "name" : "@RJBS/@Filter/UploadToCPAN", | |
144 | "version" : "4.300033" | |
134 | 145 | }, |
135 | 146 | { |
136 | 147 | "class" : "Dist::Zilla::Plugin::AutoPrereqs", |
137 | 148 | "name" : "@RJBS/AutoPrereqs", |
138 | "version" : "4.300005" | |
149 | "version" : "4.300033" | |
139 | 150 | }, |
140 | 151 | { |
141 | 152 | "class" : "Dist::Zilla::Plugin::Git::NextVersion", |
142 | 153 | "name" : "@RJBS/Git::NextVersion", |
143 | "version" : "1.113560" | |
154 | "version" : "2.012" | |
144 | 155 | }, |
145 | 156 | { |
146 | 157 | "class" : "Dist::Zilla::Plugin::PkgVersion", |
147 | 158 | "name" : "@RJBS/PkgVersion", |
148 | "version" : "4.300005" | |
159 | "version" : "4.300033" | |
149 | 160 | }, |
150 | 161 | { |
151 | 162 | "class" : "Dist::Zilla::Plugin::MetaConfig", |
152 | 163 | "name" : "@RJBS/MetaConfig", |
153 | "version" : "4.300005" | |
164 | "version" : "4.300033" | |
154 | 165 | }, |
155 | 166 | { |
156 | 167 | "class" : "Dist::Zilla::Plugin::MetaJSON", |
157 | 168 | "name" : "@RJBS/MetaJSON", |
158 | "version" : "4.300005" | |
169 | "version" : "4.300033" | |
159 | 170 | }, |
160 | 171 | { |
161 | 172 | "class" : "Dist::Zilla::Plugin::NextRelease", |
162 | 173 | "name" : "@RJBS/NextRelease", |
163 | "version" : "4.300005" | |
174 | "version" : "4.300033" | |
175 | }, | |
176 | { | |
177 | "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", | |
178 | "name" : "@RJBS/Test::ChangesHasContent", | |
179 | "version" : "0.006" | |
164 | 180 | }, |
165 | 181 | { |
166 | 182 | "class" : "Dist::Zilla::Plugin::PodSyntaxTests", |
167 | 183 | "name" : "@RJBS/PodSyntaxTests", |
168 | "version" : "4.300005" | |
169 | }, | |
170 | { | |
171 | "class" : "Dist::Zilla::Plugin::Repository", | |
172 | "name" : "@RJBS/Repository", | |
173 | "version" : "0.18" | |
184 | "version" : "4.300033" | |
185 | }, | |
186 | { | |
187 | "class" : "Dist::Zilla::Plugin::Test::Compile", | |
188 | "name" : "@RJBS/Test::Compile", | |
189 | "version" : "2.001" | |
190 | }, | |
191 | { | |
192 | "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", | |
193 | "name" : "@RJBS/ReportVersions::Tiny", | |
194 | "version" : "1.08" | |
174 | 195 | }, |
175 | 196 | { |
176 | 197 | "class" : "Dist::Zilla::Plugin::Prereqs", |
181 | 202 | } |
182 | 203 | }, |
183 | 204 | "name" : "@RJBS/TestMoreWithSubtests", |
184 | "version" : "4.300005" | |
205 | "version" : "4.300033" | |
185 | 206 | }, |
186 | 207 | { |
187 | 208 | "class" : "Dist::Zilla::Plugin::PodWeaver", |
196 | 217 | { |
197 | 218 | "class" : "Dist::Zilla::Plugin::Git::Check", |
198 | 219 | "name" : "@RJBS/@Git/Check", |
199 | "version" : "1.113560" | |
220 | "version" : "2.012" | |
200 | 221 | }, |
201 | 222 | { |
202 | 223 | "class" : "Dist::Zilla::Plugin::Git::Commit", |
203 | 224 | "name" : "@RJBS/@Git/Commit", |
204 | "version" : "1.113560" | |
225 | "version" : "2.012" | |
205 | 226 | }, |
206 | 227 | { |
207 | 228 | "class" : "Dist::Zilla::Plugin::Git::Tag", |
208 | 229 | "name" : "@RJBS/@Git/Tag", |
209 | "version" : "1.113560" | |
230 | "version" : "2.012" | |
210 | 231 | }, |
211 | 232 | { |
212 | 233 | "class" : "Dist::Zilla::Plugin::Git::Push", |
213 | 234 | "name" : "@RJBS/@Git/Push", |
214 | "version" : "1.113560" | |
235 | "version" : "2.012" | |
215 | 236 | }, |
216 | 237 | { |
217 | 238 | "class" : "Dist::Zilla::Plugin::FinderCode", |
218 | 239 | "name" : ":InstallModules", |
219 | "version" : "4.300005" | |
240 | "version" : "4.300033" | |
220 | 241 | }, |
221 | 242 | { |
222 | 243 | "class" : "Dist::Zilla::Plugin::FinderCode", |
223 | 244 | "name" : ":IncModules", |
224 | "version" : "4.300005" | |
245 | "version" : "4.300033" | |
225 | 246 | }, |
226 | 247 | { |
227 | 248 | "class" : "Dist::Zilla::Plugin::FinderCode", |
228 | 249 | "name" : ":TestFiles", |
229 | "version" : "4.300005" | |
250 | "version" : "4.300033" | |
230 | 251 | }, |
231 | 252 | { |
232 | 253 | "class" : "Dist::Zilla::Plugin::FinderCode", |
233 | 254 | "name" : ":ExecFiles", |
234 | "version" : "4.300005" | |
255 | "version" : "4.300033" | |
235 | 256 | }, |
236 | 257 | { |
237 | 258 | "class" : "Dist::Zilla::Plugin::FinderCode", |
238 | 259 | "name" : ":ShareFiles", |
239 | "version" : "4.300005" | |
260 | "version" : "4.300033" | |
240 | 261 | }, |
241 | 262 | { |
242 | 263 | "class" : "Dist::Zilla::Plugin::FinderCode", |
243 | 264 | "name" : ":MainModule", |
244 | "version" : "4.300005" | |
265 | "version" : "4.300033" | |
245 | 266 | } |
246 | 267 | ], |
247 | 268 | "zilla" : { |
249 | 270 | "config" : { |
250 | 271 | "is_trial" : "0" |
251 | 272 | }, |
252 | "version" : "4.300005" | |
273 | "version" : "4.300033" | |
253 | 274 | } |
254 | 275 | } |
255 | 276 | } |
7 | 7 | configure_requires: |
8 | 8 | ExtUtils::MakeMaker: 6.30 |
9 | 9 | dynamic_config: 0 |
10 | generated_by: 'Dist::Zilla version 4.300005, CPAN::Meta::Converter version 2.112621' | |
10 | generated_by: 'Dist::Zilla version 4.300033, CPAN::Meta::Converter version 2.130880' | |
11 | 11 | license: perl |
12 | 12 | meta-spec: |
13 | 13 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
14 | 14 | version: 1.4 |
15 | 15 | name: CPAN-Mini |
16 | 16 | requires: |
17 | CPAN: 0 | |
18 | CPANPLUS::Backend: 0 | |
17 | 19 | Carp: 0 |
18 | 20 | Compress::Zlib: 1.20 |
19 | 21 | File::Basename: 0 |
33 | 35 | resources: |
34 | 36 | homepage: https://github.com/rjbs/cpan-mini |
35 | 37 | repository: https://github.com/rjbs/cpan-mini.git |
36 | version: 1.111008 | |
38 | version: 1.111013 | |
37 | 39 | x_Dist_Zilla: |
40 | perl: | |
41 | version: 5.017010 | |
38 | 42 | plugins: |
43 | - | |
44 | class: Dist::Zilla::Plugin::Git::GatherDir | |
45 | name: '@RJBS/Git::GatherDir' | |
46 | version: 2.012 | |
39 | 47 | - |
40 | 48 | class: Dist::Zilla::Plugin::CheckPrereqsIndexed |
41 | 49 | name: '@RJBS/CheckPrereqsIndexed' |
42 | version: 0.007 | |
43 | - | |
44 | class: Dist::Zilla::Plugin::GatherDir | |
45 | name: '@RJBS/@Basic/GatherDir' | |
46 | version: 4.300005 | |
50 | version: 0.008 | |
51 | - | |
52 | class: Dist::Zilla::Plugin::CheckExtraTests | |
53 | name: '@RJBS/CheckExtraTests' | |
54 | version: 0.011 | |
47 | 55 | - |
48 | 56 | class: Dist::Zilla::Plugin::PruneCruft |
49 | name: '@RJBS/@Basic/PruneCruft' | |
50 | version: 4.300005 | |
57 | name: '@RJBS/@Filter/PruneCruft' | |
58 | version: 4.300033 | |
51 | 59 | - |
52 | 60 | class: Dist::Zilla::Plugin::ManifestSkip |
53 | name: '@RJBS/@Basic/ManifestSkip' | |
54 | version: 4.300005 | |
61 | name: '@RJBS/@Filter/ManifestSkip' | |
62 | version: 4.300033 | |
55 | 63 | - |
56 | 64 | class: Dist::Zilla::Plugin::MetaYAML |
57 | name: '@RJBS/@Basic/MetaYAML' | |
58 | version: 4.300005 | |
65 | name: '@RJBS/@Filter/MetaYAML' | |
66 | version: 4.300033 | |
59 | 67 | - |
60 | 68 | class: Dist::Zilla::Plugin::License |
61 | name: '@RJBS/@Basic/License' | |
62 | version: 4.300005 | |
69 | name: '@RJBS/@Filter/License' | |
70 | version: 4.300033 | |
63 | 71 | - |
64 | 72 | class: Dist::Zilla::Plugin::Readme |
65 | name: '@RJBS/@Basic/Readme' | |
66 | version: 4.300005 | |
67 | - | |
68 | class: Dist::Zilla::Plugin::ExtraTests | |
69 | name: '@RJBS/@Basic/ExtraTests' | |
70 | version: 4.300005 | |
73 | name: '@RJBS/@Filter/Readme' | |
74 | version: 4.300033 | |
71 | 75 | - |
72 | 76 | class: Dist::Zilla::Plugin::ExecDir |
73 | name: '@RJBS/@Basic/ExecDir' | |
74 | version: 4.300005 | |
77 | name: '@RJBS/@Filter/ExecDir' | |
78 | version: 4.300033 | |
75 | 79 | - |
76 | 80 | class: Dist::Zilla::Plugin::ShareDir |
77 | name: '@RJBS/@Basic/ShareDir' | |
78 | version: 4.300005 | |
81 | name: '@RJBS/@Filter/ShareDir' | |
82 | version: 4.300033 | |
79 | 83 | - |
80 | 84 | class: Dist::Zilla::Plugin::MakeMaker |
81 | name: '@RJBS/@Basic/MakeMaker' | |
82 | version: 4.300005 | |
85 | name: '@RJBS/@Filter/MakeMaker' | |
86 | version: 4.300033 | |
83 | 87 | - |
84 | 88 | class: Dist::Zilla::Plugin::Manifest |
85 | name: '@RJBS/@Basic/Manifest' | |
86 | version: 4.300005 | |
89 | name: '@RJBS/@Filter/Manifest' | |
90 | version: 4.300033 | |
87 | 91 | - |
88 | 92 | class: Dist::Zilla::Plugin::TestRelease |
89 | name: '@RJBS/@Basic/TestRelease' | |
90 | version: 4.300005 | |
93 | name: '@RJBS/@Filter/TestRelease' | |
94 | version: 4.300033 | |
91 | 95 | - |
92 | 96 | class: Dist::Zilla::Plugin::ConfirmRelease |
93 | name: '@RJBS/@Basic/ConfirmRelease' | |
94 | version: 4.300005 | |
97 | name: '@RJBS/@Filter/ConfirmRelease' | |
98 | version: 4.300033 | |
95 | 99 | - |
96 | 100 | class: Dist::Zilla::Plugin::UploadToCPAN |
97 | name: '@RJBS/@Basic/UploadToCPAN' | |
98 | version: 4.300005 | |
101 | name: '@RJBS/@Filter/UploadToCPAN' | |
102 | version: 4.300033 | |
99 | 103 | - |
100 | 104 | class: Dist::Zilla::Plugin::AutoPrereqs |
101 | 105 | name: '@RJBS/AutoPrereqs' |
102 | version: 4.300005 | |
106 | version: 4.300033 | |
103 | 107 | - |
104 | 108 | class: Dist::Zilla::Plugin::Git::NextVersion |
105 | 109 | name: '@RJBS/Git::NextVersion' |
106 | version: 1.113560 | |
110 | version: 2.012 | |
107 | 111 | - |
108 | 112 | class: Dist::Zilla::Plugin::PkgVersion |
109 | 113 | name: '@RJBS/PkgVersion' |
110 | version: 4.300005 | |
114 | version: 4.300033 | |
111 | 115 | - |
112 | 116 | class: Dist::Zilla::Plugin::MetaConfig |
113 | 117 | name: '@RJBS/MetaConfig' |
114 | version: 4.300005 | |
118 | version: 4.300033 | |
115 | 119 | - |
116 | 120 | class: Dist::Zilla::Plugin::MetaJSON |
117 | 121 | name: '@RJBS/MetaJSON' |
118 | version: 4.300005 | |
122 | version: 4.300033 | |
119 | 123 | - |
120 | 124 | class: Dist::Zilla::Plugin::NextRelease |
121 | 125 | name: '@RJBS/NextRelease' |
122 | version: 4.300005 | |
126 | version: 4.300033 | |
127 | - | |
128 | class: Dist::Zilla::Plugin::Test::ChangesHasContent | |
129 | name: '@RJBS/Test::ChangesHasContent' | |
130 | version: 0.006 | |
123 | 131 | - |
124 | 132 | class: Dist::Zilla::Plugin::PodSyntaxTests |
125 | 133 | name: '@RJBS/PodSyntaxTests' |
126 | version: 4.300005 | |
127 | - | |
128 | class: Dist::Zilla::Plugin::Repository | |
129 | name: '@RJBS/Repository' | |
130 | version: 0.18 | |
134 | version: 4.300033 | |
135 | - | |
136 | class: Dist::Zilla::Plugin::Test::Compile | |
137 | name: '@RJBS/Test::Compile' | |
138 | version: 2.001 | |
139 | - | |
140 | class: Dist::Zilla::Plugin::ReportVersions::Tiny | |
141 | name: '@RJBS/ReportVersions::Tiny' | |
142 | version: 1.08 | |
131 | 143 | - |
132 | 144 | class: Dist::Zilla::Plugin::Prereqs |
133 | 145 | config: |
135 | 147 | phase: test |
136 | 148 | type: requires |
137 | 149 | name: '@RJBS/TestMoreWithSubtests' |
138 | version: 4.300005 | |
150 | version: 4.300033 | |
139 | 151 | - |
140 | 152 | class: Dist::Zilla::Plugin::PodWeaver |
141 | 153 | name: '@RJBS/PodWeaver' |
147 | 159 | - |
148 | 160 | class: Dist::Zilla::Plugin::Git::Check |
149 | 161 | name: '@RJBS/@Git/Check' |
150 | version: 1.113560 | |
162 | version: 2.012 | |
151 | 163 | - |
152 | 164 | class: Dist::Zilla::Plugin::Git::Commit |
153 | 165 | name: '@RJBS/@Git/Commit' |
154 | version: 1.113560 | |
166 | version: 2.012 | |
155 | 167 | - |
156 | 168 | class: Dist::Zilla::Plugin::Git::Tag |
157 | 169 | name: '@RJBS/@Git/Tag' |
158 | version: 1.113560 | |
170 | version: 2.012 | |
159 | 171 | - |
160 | 172 | class: Dist::Zilla::Plugin::Git::Push |
161 | 173 | name: '@RJBS/@Git/Push' |
162 | version: 1.113560 | |
174 | version: 2.012 | |
163 | 175 | - |
164 | 176 | class: Dist::Zilla::Plugin::FinderCode |
165 | 177 | name: ':InstallModules' |
166 | version: 4.300005 | |
178 | version: 4.300033 | |
167 | 179 | - |
168 | 180 | class: Dist::Zilla::Plugin::FinderCode |
169 | 181 | name: ':IncModules' |
170 | version: 4.300005 | |
182 | version: 4.300033 | |
171 | 183 | - |
172 | 184 | class: Dist::Zilla::Plugin::FinderCode |
173 | 185 | name: ':TestFiles' |
174 | version: 4.300005 | |
186 | version: 4.300033 | |
175 | 187 | - |
176 | 188 | class: Dist::Zilla::Plugin::FinderCode |
177 | 189 | name: ':ExecFiles' |
178 | version: 4.300005 | |
190 | version: 4.300033 | |
179 | 191 | - |
180 | 192 | class: Dist::Zilla::Plugin::FinderCode |
181 | 193 | name: ':ShareFiles' |
182 | version: 4.300005 | |
194 | version: 4.300033 | |
183 | 195 | - |
184 | 196 | class: Dist::Zilla::Plugin::FinderCode |
185 | 197 | name: ':MainModule' |
186 | version: 4.300005 | |
198 | version: 4.300033 | |
187 | 199 | zilla: |
188 | 200 | class: Dist::Zilla::Dist::Builder |
189 | 201 | config: |
190 | 202 | is_trial: 0 |
191 | version: 4.300005 | |
203 | version: 4.300033 |
10 | 10 | my %WriteMakefileArgs = ( |
11 | 11 | "ABSTRACT" => "create a minimal mirror of CPAN", |
12 | 12 | "AUTHOR" => "Ricardo SIGNES <rjbs\@cpan.org>, Randal Schwartz <merlyn\@stonehenge.com>", |
13 | "BUILD_REQUIRES" => { | |
14 | "Test::More" => "0.96" | |
15 | }, | |
13 | "BUILD_REQUIRES" => {}, | |
16 | 14 | "CONFIGURE_REQUIRES" => { |
17 | 15 | "ExtUtils::MakeMaker" => "6.30" |
18 | 16 | }, |
23 | 21 | "LICENSE" => "perl", |
24 | 22 | "NAME" => "CPAN::Mini", |
25 | 23 | "PREREQ_PM" => { |
24 | "CPAN" => 0, | |
25 | "CPANPLUS::Backend" => 0, | |
26 | 26 | "Carp" => 0, |
27 | 27 | "Compress::Zlib" => "1.20", |
28 | 28 | "File::Basename" => 0, |
39 | 39 | "strict" => 0, |
40 | 40 | "warnings" => 0 |
41 | 41 | }, |
42 | "VERSION" => "1.111008", | |
42 | "TEST_REQUIRES" => { | |
43 | "Test::More" => "0.96" | |
44 | }, | |
45 | "VERSION" => "1.111013", | |
43 | 46 | "test" => { |
44 | 47 | "TESTS" => "t/*.t" |
45 | 48 | } |
46 | 49 | ); |
47 | 50 | |
51 | ||
52 | unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { | |
53 | my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; | |
54 | my $br = $WriteMakefileArgs{BUILD_REQUIRES}; | |
55 | for my $mod ( keys %$tr ) { | |
56 | if ( exists $br->{$mod} ) { | |
57 | $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; | |
58 | } | |
59 | else { | |
60 | $br->{$mod} = $tr->{$mod}; | |
61 | } | |
62 | } | |
63 | } | |
48 | 64 | |
49 | 65 | unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { |
50 | 66 | my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; |
0 | 0 | |
1 | 1 | |
2 | 2 | This archive contains the distribution CPAN-Mini, |
3 | version 1.111008: | |
3 | version 1.111013: | |
4 | 4 | |
5 | 5 | create a minimal mirror of CPAN |
6 | 6 |
6 | 6 | # PODNAME: minicpan |
7 | 7 | # ABSTRACT: uses CPAN::Mini to create or update a local mirror |
8 | 8 | |
9 | ||
9 | __END__ | |
10 | 10 | |
11 | 11 | =pod |
12 | 12 | |
16 | 16 | |
17 | 17 | =head1 VERSION |
18 | 18 | |
19 | version 1.111008 | |
19 | version 1.111013 | |
20 | 20 | |
21 | 21 | =head1 SYNOPSIS |
22 | 22 | |
39 | 39 | -t SEC - timeout in sec. Defaults to 180 sec |
40 | 40 | --offline - operate in offline mode (generally: do nothing) |
41 | 41 | --log-level - provide a log level; instead of --debug, -q, or -qq |
42 | --remote-from TYPE - cpan remote from 'cpan' or 'cpanplus' configs | |
42 | 43 | |
43 | 44 | =head1 DESCRIPTION |
44 | 45 | |
108 | 109 | the same terms as the Perl 5 programming language system itself. |
109 | 110 | |
110 | 111 | =cut |
111 | ||
112 | ||
113 | __END__ | |
114 |
2 | 2 | |
3 | 3 | package CPAN::Mini::App; |
4 | 4 | { |
5 | $CPAN::Mini::App::VERSION = '1.111008'; | |
5 | $CPAN::Mini::App::VERSION = '1.111013'; | |
6 | 6 | } |
7 | 7 | |
8 | 8 | # ABSTRACT: the guts of the minicpan command |
45 | 45 | |
46 | 46 | my %commandline; |
47 | 47 | |
48 | my ($quiet, $debug, $log_level); | |
48 | my @option_spec = $class->_option_spec(); | |
49 | GetOptions(\%commandline, @option_spec) or pod2usage(2); | |
49 | 50 | |
50 | GetOptions( | |
51 | 'c|class=s' => \$commandline{class}, | |
51 | # These two options will cause the program to exit before finishing ->run | |
52 | pod2usage(1) if $commandline{help}; | |
53 | $version = 1 if $commandline{version}; | |
52 | 54 | |
53 | # These two options will cause the program to exit before finishing ->run | |
54 | 'h|help' => sub { pod2usage(1); }, | |
55 | 'v|version' => sub { $version = 1 }, | |
56 | ||
57 | # How noisy should we be? | |
58 | 'quiet|q+' => \$quiet, | |
59 | 'qq' => sub { $quiet = 2 }, | |
60 | 'debug' => \$debug, | |
61 | 'log-level=s' => \$log_level, | |
62 | ||
63 | 'l|local=s' => \$commandline{local}, | |
64 | 'r|remote=s' => \$commandline{remote}, | |
65 | ||
66 | 'd|dirmode=s' => \$commandline{dirmode}, | |
67 | 'offline' => \$commandline{offline}, | |
68 | 'f' => \$commandline{force}, | |
69 | 'p' => \$commandline{perl}, | |
70 | 'x' => \$commandline{exact_mirror}, | |
71 | 't|timeout=i' => \$commandline{timeout}, | |
72 | ||
73 | # Where to look for config not provided on the command line: | |
74 | 'C|config=s' => \$commandline{config_file}, | |
75 | ) or pod2usage(2); | |
55 | # How noisy should we be? | |
56 | my $debug = $commandline{debug}; | |
57 | my $log_level = $commandline{log_level}; | |
58 | my $quiet = $commandline{qq} ? 2 : $commandline{quiet}; | |
76 | 59 | |
77 | 60 | die "can't mix --debug, --log-level, and --debug\n" |
78 | 61 | if defined($quiet) + defined($debug) + defined($log_level) > 1; |
79 | 62 | |
63 | # Set log_level accordingly | |
80 | 64 | $quiet ||= 0; |
81 | 65 | $log_level = $debug ? 'debug' |
82 | 66 | : $quiet == 1 ? 'warn' |
83 | 67 | : $quiet >= 2 ? 'fatal' |
84 | 68 | : $log_level ? $log_level |
85 | 69 | : undef; |
86 | ||
87 | $class->_validate_log_level($log_level) if defined $log_level; | |
88 | 70 | |
89 | 71 | my %config = CPAN::Mini->read_config({ |
90 | 72 | log_level => 'info', |
93 | 75 | |
94 | 76 | $config{class} ||= 'CPAN::Mini'; |
95 | 77 | |
96 | foreach my $key (keys %commandline) { | |
97 | $config{$key} = $commandline{$key} if defined $commandline{$key}; | |
98 | } | |
78 | # Override config with commandline options | |
79 | %config = (%config, %commandline); | |
99 | 80 | |
100 | 81 | $config{log_level} = $log_level || $config{log_level} || 'info'; |
101 | ||
102 | 82 | $class->_validate_log_level($config{log_level}); |
103 | 83 | |
104 | 84 | eval "require $config{class}"; |
105 | 85 | die $@ if $@; |
106 | 86 | |
107 | 87 | _display_version($config{class}) if $version; |
88 | ||
89 | if ($config{remote_from} && ! $config{remote}) { | |
90 | $config{remote} = $config{class}->remote_from( | |
91 | $config{remote_from}, | |
92 | $config{remote}, | |
93 | $config{quiet}, | |
94 | ); | |
95 | } | |
96 | ||
97 | $config{remote} ||= 'http://www.cpan.org/'; | |
98 | ||
108 | 99 | pod2usage(2) unless $config{local} and $config{remote}; |
109 | 100 | |
110 | 101 | $|++; |
111 | $config{dirmode} &&= oct($config{dirmode}); | |
112 | 102 | |
113 | return $config{class}->new( | |
114 | remote => $config{remote}, | |
115 | local => $config{local}, | |
116 | force => $config{force}, | |
117 | offline => $config{offline}, | |
118 | also_mirror => $config{also_mirror}, | |
119 | exact_mirror => $config{exact_mirror}, | |
120 | module_filters => $config{module_filters}, | |
121 | path_filters => $config{path_filters}, | |
122 | skip_cleanup => $config{skip_cleanup}, | |
123 | skip_perl => (not $config{perl}), | |
124 | timeout => $config{timeout}, | |
125 | ignore_source_control => $config{ignore_source_control}, | |
126 | (defined $config{dirmode} ? (dirmode => $config{dirmode}) : ()), | |
103 | # Convert dirmode string to a real octal value, if given | |
104 | $config{dirmode} = oct $config{dirmode} if $config{dirmode}; | |
127 | 105 | |
128 | log_level => $config{log_level}, | |
129 | ); | |
106 | # Turn the 'perl' option into 'skip_perl', for backward compatibility | |
107 | $config{skip_perl} = not delete $config{perl}; | |
108 | ||
109 | return $config{class}->new(%config); | |
110 | } | |
111 | ||
112 | sub _option_spec { | |
113 | return qw< | |
114 | class|c=s | |
115 | help|h | |
116 | version|v | |
117 | quiet|q+ | |
118 | ||
119 | debug | |
120 | log_level|log-level=s | |
121 | local|l=s | |
122 | remote|r=s | |
123 | dirmode|d=s | |
124 | offline | |
125 | force|f | |
126 | perl | |
127 | exact_mirror|x | |
128 | timeout|t=i | |
129 | config_file|config|C=s | |
130 | remote-from=s | |
131 | >; | |
130 | 132 | } |
131 | 133 | |
132 | 134 | |
133 | 135 | 1; |
134 | 136 | |
135 | 137 | __END__ |
138 | ||
136 | 139 | =pod |
137 | 140 | |
138 | 141 | =head1 NAME |
141 | 144 | |
142 | 145 | =head1 VERSION |
143 | 146 | |
144 | version 1.111008 | |
147 | version 1.111013 | |
145 | 148 | |
146 | 149 | =head1 SYNOPSIS |
147 | 150 | |
156 | 159 | This method is called by F<minicpan> to do all the work. Don't rely on what it |
157 | 160 | does just yet. |
158 | 161 | |
159 | =head1 SEE ALSO | |
162 | =head1 SEE ALSO | |
160 | 163 | |
161 | 164 | Randal Schwartz's original article, which can be found here: |
162 | 165 | |
184 | 187 | the same terms as the Perl 5 programming language system itself. |
185 | 188 | |
186 | 189 | =cut |
187 |
3 | 3 | |
4 | 4 | package CPAN::Mini; |
5 | 5 | { |
6 | $CPAN::Mini::VERSION = '1.111008'; | |
6 | $CPAN::Mini::VERSION = '1.111013'; | |
7 | 7 | } |
8 | 8 | |
9 | 9 | # ABSTRACT: create a minimal mirror of CPAN |
32 | 32 | $self = $self->new(@_) unless ref $self; |
33 | 33 | |
34 | 34 | unless ($self->{offline}) { |
35 | $self->log("Updating $self->{local}"); | |
35 | my $local = $self->{local}; | |
36 | ||
37 | $self->log("Updating $local"); | |
36 | 38 | $self->log("Mirroring from $self->{remote}"); |
37 | 39 | $self->log("=" x 63); |
40 | ||
41 | die "local mirror target $local is not writable" unless -w $local; | |
38 | 42 | |
39 | 43 | # mirrored tracks the already done, keyed by filename |
40 | 44 | # 1 = local-checked, 2 = remote-mirrored |
91 | 95 | or die "Cannot open details: $Compress::Zlib::gzerrno"; |
92 | 96 | |
93 | 97 | my $inheader = 1; |
98 | my $file_ok = 0; | |
94 | 99 | while ($gz->gzreadline($_) > 0) { |
95 | 100 | if ($inheader) { |
96 | $inheader = 0 unless /\S/; | |
101 | if (/\S/) { | |
102 | my ($header, $value) = split /:\s*/, $_, 2; | |
103 | chomp $value; | |
104 | $file_ok = 1 if $header eq 'File' | |
105 | and $value eq '02packages.details.txt'; | |
106 | } else { | |
107 | $inheader = 0; | |
108 | } | |
109 | ||
97 | 110 | next; |
98 | 111 | } |
112 | ||
113 | die "02packages.details.txt file is not a valid index\n" | |
114 | unless $file_ok; | |
99 | 115 | |
100 | 116 | my ($module, $version, $path) = split; |
101 | 117 | next if $self->_filter_module({ |
329 | 345 | for (@$filter) { |
330 | 346 | return 1 if $self->__do_filter($_, $file); |
331 | 347 | } |
348 | return; | |
332 | 349 | } |
333 | 350 | |
334 | 351 | if (ref($filter) eq 'CODE') { |
433 | 450 | $_[0]->log_unconditionally($_[1], $_[2]); |
434 | 451 | } |
435 | 452 | |
436 | sub trace { my $self = shift; $self->log_info(@_); } | |
453 | sub trace { | |
454 | my $self = shift; | |
455 | $self->log(@_); | |
456 | } | |
437 | 457 | |
438 | 458 | sub log_debug { |
439 | 459 | my ($self, @rest) = @_; |
477 | 497 | $class->log("Using config from $config_file") |
478 | 498 | if ($options->{log_level}||'info') =~ /\A(?:warn|fatal)\z/; |
479 | 499 | |
500 | substr($config_file, 0, 1, $class->__homedir) | |
501 | if substr($config_file, 0, 1) eq q{~}; | |
502 | ||
480 | 503 | return unless -e $config_file; |
481 | 504 | |
482 | 505 | open my $config_fh, '<', $config_file |
483 | 506 | or die "couldn't open config file $config_file: $!"; |
484 | 507 | |
485 | 508 | my %config; |
509 | my %is_multivalue = map {; $_ => 1 } | |
510 | qw(also_mirror module_filters path_filters); | |
511 | ||
512 | $config{$_} = [] for keys %is_multivalue; | |
513 | ||
486 | 514 | while (<$config_fh>) { |
487 | 515 | chomp; |
488 | 516 | next if /\A\s*\Z/sm; |
489 | if (/\A(\w+):\s*(\S.*?)\s*\Z/sm) { $config{$1} = $2; } | |
517 | ||
518 | if (/\A(\w+):\s*(\S.*?)\s*\Z/sm) { | |
519 | my ($key, $value) = ($1, $2); | |
520 | ||
521 | if ($is_multivalue{ $key }) { | |
522 | push @{ $config{$key} }, split /\s+/, $value; | |
523 | } else { | |
524 | $config{ $key } = $value; | |
525 | } | |
526 | } | |
490 | 527 | } |
491 | 528 | |
492 | 529 | for (qw(also_mirror)) { |
493 | $config{$_} = [ grep { length } split /\s+/, $config{$_} ] if $config{$_}; | |
530 | $config{$_} = [ grep { length } @{ $config{$_} } ]; | |
494 | 531 | } |
495 | 532 | |
496 | 533 | for (qw(module_filters path_filters)) { |
497 | $config{$_} = [ map { qr/$_/ } split /\s+/, $config{$_} ] if $config{$_}; | |
534 | $config{$_} = [ map { qr/$_/ } @{ $config{$_} } ]; | |
535 | } | |
536 | ||
537 | for (keys %is_multivalue) { | |
538 | delete $config{$_} unless @{ $config{$_} }; | |
498 | 539 | } |
499 | 540 | |
500 | 541 | return %config; |
526 | 567 | } |
527 | 568 | |
528 | 569 | |
570 | sub remote_from { | |
571 | my ( $class, $remote_from, $orig_remote, $quiet ) = @_; | |
572 | ||
573 | my $method = lc "remote_from_" . $remote_from; | |
574 | ||
575 | Carp::croak "unknown remote_from value: $remote_from" | |
576 | unless $class->can($method); | |
577 | ||
578 | my $new_remote = $class->$method; | |
579 | ||
580 | warn "overriding '$orig_remote' with '$new_remote' via $method\n" | |
581 | if !$quiet && $orig_remote; | |
582 | ||
583 | return $new_remote; | |
584 | } | |
585 | ||
586 | ||
587 | sub remote_from_cpan { | |
588 | my ($self) = @_; | |
589 | ||
590 | Carp::croak "unable find a CPAN, maybe you need to install it" | |
591 | unless eval { require CPAN; 1 }; | |
592 | ||
593 | CPAN::HandleConfig::require_myconfig_or_config(); | |
594 | ||
595 | Carp::croak "unable to find mirror list in your CPAN config" | |
596 | unless exists $CPAN::Config->{urllist}; | |
597 | ||
598 | Carp::croak "unable to find first mirror url in your CPAN config" | |
599 | unless ref( $CPAN::Config->{urllist} ) eq 'ARRAY' && $CPAN::Config->{urllist}[0]; | |
600 | ||
601 | return $CPAN::Config->{urllist}[0]; | |
602 | } | |
603 | ||
604 | ||
605 | sub remote_from_cpanplus { | |
606 | my ($self) = @_; | |
607 | ||
608 | Carp::croak "unable find a CPANPLUS, maybe you need to install it" | |
609 | unless eval { require CPANPLUS::Backend }; | |
610 | ||
611 | my $cb = CPANPLUS::Backend->new; | |
612 | my $hosts = $cb->configure_object->get_conf('hosts'); | |
613 | ||
614 | Carp::croak "unable to find mirror list in your CPANPLUS config" | |
615 | unless $hosts; | |
616 | ||
617 | Carp::croak "unable to find first mirror in your CPANPLUS config" | |
618 | unless ref($hosts) eq 'ARRAY' && $hosts->[0]; | |
619 | ||
620 | my $url_parts = $hosts->[0]; | |
621 | return $url_parts->{scheme} . "://" . $url_parts->{host} . ( $url_parts->{path} || '' ); | |
622 | } | |
623 | ||
624 | ||
529 | 625 | 1; |
530 | 626 | |
531 | 627 | __END__ |
628 | ||
532 | 629 | =pod |
533 | 630 | |
534 | 631 | =head1 NAME |
537 | 634 | |
538 | 635 | =head1 VERSION |
539 | 636 | |
540 | version 1.111008 | |
637 | version 1.111013 | |
541 | 638 | |
542 | 639 | =head1 SYNOPSIS |
543 | 640 | |
590 | 687 | ); |
591 | 688 | |
592 | 689 | This is the only method that need be called from outside this module. It will |
593 | update the local mirror with the files from the remote mirror. | |
690 | update the local mirror with the files from the remote mirror. | |
594 | 691 | |
595 | 692 | If called as a class method, C<update_mirror> creates an ephemeral CPAN::Mini |
596 | 693 | object on which other methods are called. That object is used to store mirror |
601 | 698 | The following options are recognized: |
602 | 699 | |
603 | 700 | =over 4 |
701 | ||
702 | =item * | |
703 | ||
704 | C<local> | |
705 | ||
706 | This is the local file path where the mirror will be written or updated. | |
707 | ||
708 | =item * | |
709 | ||
710 | C<remote> | |
711 | ||
712 | This is the URL of the CPAN mirror from which to work. A reasonable default | |
713 | will be picked by default. A list of CPAN mirrors can be found at | |
714 | L<http://www.cpan.org/SITES.html> | |
604 | 715 | |
605 | 716 | =item * |
606 | 717 | |
741 | 852 | |
742 | 853 | This method looks through the local mirror's files. If it finds a file that |
743 | 854 | neither belongs in the mirror nor is allowed (see the C<file_allowed> method), |
744 | C<clean_file> is called on the file. | |
855 | C<clean_file> is called on the file. | |
745 | 856 | |
746 | 857 | If you set C<ignore_source_control> to a true value, then this doesn't clean |
747 | 858 | up files that belong to source control systems. Currently this ignores: |
783 | 894 | |
784 | 895 | =head2 config_file |
785 | 896 | |
786 | my %config = CPAN::Mini->config_file( { options } ); | |
897 | my $config_file = CPAN::Mini->config_file( { options } ); | |
787 | 898 | |
788 | 899 | This routine returns the config file name. It first looks at for the |
789 | 900 | C<config_file> setting, then the C<CPAN_MINI_CONFIG> environment |
790 | 901 | variable, then the default F<~/.minicpanrc>, and finally the |
791 | 902 | F<CPAN/Mini/minicpan.conf>. It uses the first defined value it finds. |
792 | If the filename it selects does not exist, it returns the empty list. | |
793 | ||
794 | OPTIONS is an optional hash reference of the C<CPAN::Mini> config hash. | |
903 | If the filename it selects does not exist, it returns false. | |
904 | ||
905 | OPTIONS is an optional hash reference of the C<CPAN::Mini> config hash. | |
795 | 906 | |
796 | 907 | =begin devel |
797 | 908 | |
809 | 920 | |
810 | 921 | =end devel |
811 | 922 | |
923 | =head2 remote_from | |
924 | ||
925 | my $remote = CPAN::Mini->remote_from( $remote_from, $orig_remote, $quiet ); | |
926 | ||
927 | This routine take an string argument and turn it into a method | |
928 | call to handle to retrieve the a cpan mirror url from a source. | |
929 | Currently supported methods: | |
930 | ||
931 | cpan - fetch the first mirror from your CPAN.pm config | |
932 | cpanplus - fetch the first mirror from your CPANPLUS.pm config | |
933 | ||
934 | =head2 remote_from_cpan | |
935 | ||
936 | my $remote = CPAN::Mini->remote_from_cpan; | |
937 | ||
938 | This routine loads your CPAN.pm config and returns the first mirror in mirror | |
939 | list. You can set this as your default by setting remote_from:cpan in your | |
940 | F<.minicpanrc> file. | |
941 | ||
942 | =head2 remote_from_cpanplus | |
943 | ||
944 | my $remote = CPAN::Mini->remote_from_cpanplus; | |
945 | ||
946 | This routine loads your CPANPLUS.pm config and returns the first mirror in | |
947 | mirror list. You can set this as your default by setting remote_from:cpanplus | |
948 | in your F<.minicpanrc> file. | |
949 | ||
812 | 950 | =head1 SEE ALSO |
813 | 951 | |
814 | 952 | Randal Schwartz's original article on minicpan, here: |
859 | 997 | the same terms as the Perl 5 programming language system itself. |
860 | 998 | |
861 | 999 | =cut |
862 |
0 | #!perl | |
1 | ||
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Test::More; | |
6 | ||
7 | ||
8 | ||
9 | use File::Find; | |
10 | use File::Temp qw{ tempdir }; | |
11 | ||
12 | my @modules; | |
13 | find( | |
14 | sub { | |
15 | return if $File::Find::name !~ /\.pm\z/; | |
16 | my $found = $File::Find::name; | |
17 | $found =~ s{^lib/}{}; | |
18 | $found =~ s{[/\\]}{::}g; | |
19 | $found =~ s/\.pm$//; | |
20 | # nothing to skip | |
21 | push @modules, $found; | |
22 | }, | |
23 | 'lib', | |
24 | ); | |
25 | ||
26 | sub _find_scripts { | |
27 | my $dir = shift @_; | |
28 | ||
29 | my @found_scripts = (); | |
30 | find( | |
31 | sub { | |
32 | return unless -f; | |
33 | my $found = $File::Find::name; | |
34 | # nothing to skip | |
35 | open my $FH, '<', $_ or do { | |
36 | note( "Unable to open $found in ( $! ), skipping" ); | |
37 | return; | |
38 | }; | |
39 | my $shebang = <$FH>; | |
40 | return unless $shebang =~ /^#!.*?\bperl\b\s*$/; | |
41 | push @found_scripts, $found; | |
42 | }, | |
43 | $dir, | |
44 | ); | |
45 | ||
46 | return @found_scripts; | |
47 | } | |
48 | ||
49 | my @scripts; | |
50 | do { push @scripts, _find_scripts($_) if -d $_ } | |
51 | for qw{ bin script scripts }; | |
52 | ||
53 | my $plan = scalar(@modules) + scalar(@scripts); | |
54 | $plan ? (plan tests => $plan) : (plan skip_all => "no tests to run"); | |
55 | ||
56 | { | |
57 | # fake home for cpan-testers | |
58 | # no fake requested ## local $ENV{HOME} = tempdir( CLEANUP => 1 ); | |
59 | ||
60 | like( qx{ $^X -Ilib -e "require $_; print '$_ ok'" }, qr/^\s*$_ ok/s, "$_ loaded ok" ) | |
61 | for sort @modules; | |
62 | ||
63 | SKIP: { | |
64 | eval "use Test::Script 1.05; 1;"; | |
65 | skip "Test::Script needed to test script compilation", scalar(@scripts) if $@; | |
66 | foreach my $file ( @scripts ) { | |
67 | my $script = $file; | |
68 | $script =~ s!.*/!!; | |
69 | script_compiles( $file, "$script script compiles" ); | |
70 | } | |
71 | } | |
72 | ||
73 | } |
0 | use strict; | |
1 | use warnings; | |
2 | use Test::More 0.88; | |
3 | # This is a relatively nice way to avoid Test::NoWarnings breaking our | |
4 | # expectations by adding extra tests, without using no_plan. It also helps | |
5 | # avoid any other test module that feels introducing random tests, or even | |
6 | # test plans, is a nice idea. | |
7 | our $success = 0; | |
8 | END { $success && done_testing; } | |
9 | ||
10 | # List our own version used to generate this | |
11 | my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08\n"; | |
12 | ||
13 | eval { # no excuses! | |
14 | # report our Perl details | |
15 | my $want = '5.006'; | |
16 | $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; | |
17 | }; | |
18 | defined($@) and diag("$@"); | |
19 | ||
20 | # Now, our module version dependencies: | |
21 | sub pmver { | |
22 | my ($module, $wanted) = @_; | |
23 | $wanted = " (want $wanted)"; | |
24 | my $pmver; | |
25 | eval "require $module;"; | |
26 | if ($@) { | |
27 | if ($@ =~ m/Can't locate .* in \@INC/) { | |
28 | $pmver = 'module not found.'; | |
29 | } else { | |
30 | diag("${module}: $@"); | |
31 | $pmver = 'died during require.'; | |
32 | } | |
33 | } else { | |
34 | my $version; | |
35 | eval { $version = $module->VERSION; }; | |
36 | if ($@) { | |
37 | diag("${module}: $@"); | |
38 | $pmver = 'died during VERSION check.'; | |
39 | } elsif (defined $version) { | |
40 | $pmver = "$version"; | |
41 | } else { | |
42 | $pmver = '<undef>'; | |
43 | } | |
44 | } | |
45 | ||
46 | # So, we should be good, right? | |
47 | return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); | |
48 | } | |
49 | ||
50 | eval { $v .= pmver('CPAN','any version') }; | |
51 | eval { $v .= pmver('CPANPLUS::Backend','any version') }; | |
52 | eval { $v .= pmver('Carp','any version') }; | |
53 | eval { $v .= pmver('Compress::Zlib','1.20') }; | |
54 | eval { $v .= pmver('ExtUtils::MakeMaker','6.30') }; | |
55 | eval { $v .= pmver('File::Basename','any version') }; | |
56 | eval { $v .= pmver('File::Copy','any version') }; | |
57 | eval { $v .= pmver('File::Find','any version') }; | |
58 | eval { $v .= pmver('File::HomeDir','0.57') }; | |
59 | eval { $v .= pmver('File::Path','2.04') }; | |
60 | eval { $v .= pmver('File::Spec','any version') }; | |
61 | eval { $v .= pmver('File::Temp','any version') }; | |
62 | eval { $v .= pmver('Getopt::Long','any version') }; | |
63 | eval { $v .= pmver('LWP::UserAgent','5') }; | |
64 | eval { $v .= pmver('Pod::Usage','1.00') }; | |
65 | eval { $v .= pmver('Test::More','0.96') }; | |
66 | eval { $v .= pmver('Test::Pod','1.41') }; | |
67 | eval { $v .= pmver('URI','1') }; | |
68 | eval { $v .= pmver('strict','any version') }; | |
69 | eval { $v .= pmver('version','0.9901') }; | |
70 | eval { $v .= pmver('warnings','any version') }; | |
71 | ||
72 | ||
73 | # All done. | |
74 | $v .= <<'EOT'; | |
75 | ||
76 | Thanks for using my code. I hope it works for you. | |
77 | If not, please try and include this output in the bug report. | |
78 | That will help me reproduce the issue and solve your problem. | |
79 | ||
80 | EOT | |
81 | ||
82 | diag($v); | |
83 | ok(1, "we really didn't test anything, just reporting data"); | |
84 | $success = 1; | |
85 | ||
86 | # Work around another nasty module on CPAN. :/ | |
87 | no warnings 'once'; | |
88 | $Template::Test::NO_FLUSH = 1; | |
89 | exit 0; |
10 | 10 | |
11 | 11 | delete $ENV{CPAN_MINI_CONFIG}; |
12 | 12 | |
13 | { | |
14 | no warnings 'redefine'; | |
15 | *File::HomeDir::my_home = sub { $ENV{HOME} }; | |
16 | } | |
17 | ||
13 | 18 | sub config_dir { |
14 | 19 | my ($config) = @_; |
15 | 20 | |
16 | 21 | my $tempdir = tempdir(CLEANUP => 1); |
17 | 22 | |
18 | return unless defined $config; | |
23 | return $tempdir unless defined $config; | |
19 | 24 | |
20 | 25 | my $filename = File::Spec->catfile($tempdir, '.minicpanrc'); |
21 | 26 | open my $config_fh, '>', $filename or die "can't write to $filename: $!"; |
104 | 109 | }; |
105 | 110 | } |
106 | 111 | |
112 | ||
113 | subtest "-perl switch" => sub { | |
114 | ||
115 | local $ENV{HOME} = config_dir; | |
116 | local @ARGV = @LR_ARGS; | |
117 | ||
118 | my $minicpan = CPAN::Mini::App->initialize_minicpan; | |
119 | isa_ok($minicpan, 'CPAN::Mini'); | |
120 | is($minicpan->{skip_perl}, 1, "'skip_perl' is true without -perl switch"); | |
121 | ||
122 | ||
123 | local @ARGV = ('-perl', @LR_ARGS); | |
124 | $minicpan = CPAN::Mini::App->initialize_minicpan; | |
125 | isa_ok($minicpan, 'CPAN::Mini'); | |
126 | is($minicpan->{skip_perl}, q{}, "'skip_perl' is false with -perl switch"); | |
127 | }; | |
128 | ||
107 | 129 | done_testing; |
108 | 130 | |
109 | 131 | 1; |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{RELEASE_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
6 | } | |
7 | } | |
8 | ||
9 | use Test::More; | |
10 | ||
11 | eval "use Test::Pod 1.41"; | |
12 | plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; | |
13 | ||
14 | all_pod_files_ok(); |
0 | #!perl | |
1 | ||
2 | use Test::More tests => 2; | |
3 | ||
4 | note 'Checking Changes'; | |
5 | my $changes_file = 'Changes'; | |
6 | my $newver = '1.111013'; | |
7 | my $trial_token = '-TRIAL'; | |
8 | ||
9 | SKIP: { | |
10 | ok(-e $changes_file, "$changes_file file exists") | |
11 | or skip 'Changes is missing', 1; | |
12 | ||
13 | ok(_get_changes($newver), "$changes_file has content for $newver"); | |
14 | } | |
15 | ||
16 | done_testing; | |
17 | ||
18 | # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit | |
19 | # by Jerome Quelin | |
20 | sub _get_changes | |
21 | { | |
22 | my $newver = shift; | |
23 | ||
24 | # parse changelog to find commit message | |
25 | open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!"; | |
26 | my $changelog = join('', <$fh>); | |
27 | close $fh; | |
28 | ||
29 | my @content = | |
30 | grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented | |
31 | split /\n/, $changelog; | |
32 | shift @content; # drop the version line | |
33 | ||
34 | # drop unindented last line and trailing blank lines | |
35 | pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); | |
36 | ||
37 | # return number of non-blank lines | |
38 | return scalar @content; | |
39 | } | |
40 |