Import upstream version 0.004+git20200722.1.b413154
Debian Janitor
2 years ago
0 | name: 'Build & Test' | |
1 | ||
2 | on: | |
3 | push: | |
4 | branches: | |
5 | - "*" | |
6 | tags-ignore: | |
7 | - "*" | |
8 | pull_request: | |
9 | ||
10 | jobs: | |
11 | ||
12 | ### | |
13 | ### Fast Test on System Perl | |
14 | ### | |
15 | ||
16 | ubuntu-latest: | |
17 | runs-on: ubuntu-latest | |
18 | ||
19 | env: | |
20 | PERL_USE_UNSAFE_INC: 0 | |
21 | AUTHOR_TESTING: 1 | |
22 | AUTOMATED_TESTING: 1 | |
23 | RELEASE_TESTING: 1 | |
24 | PERL_CARTON_PATH: $GITHUB_WORKSPACE/local | |
25 | ||
26 | steps: | |
27 | - uses: actions/checkout@v2 | |
28 | - name: perl -V | |
29 | run: perl -V | |
30 | - name: Install Dependencies | |
31 | uses: perl-actions/install-with-cpm@master | |
32 | with: | |
33 | cpanfile: "cpanfile" | |
34 | - name: perl Makefile.PL | |
35 | run: perl Makefile.PL | |
36 | - name: make | |
37 | run: make | |
38 | - name: Run Tests | |
39 | run: make test | |
40 | ||
41 | ### | |
42 | ### linux testing multiple Perl versions | |
43 | ### | |
44 | ||
45 | linux: | |
46 | name: "Perl v${{ matrix.perl-version }}" | |
47 | runs-on: ubuntu-latest | |
48 | ||
49 | env: | |
50 | PERL_USE_UNSAFE_INC: 0 | |
51 | AUTHOR_TESTING: 1 | |
52 | AUTOMATED_TESTING: 1 | |
53 | RELEASE_TESTING: 1 | |
54 | PERL_CARTON_PATH: $GITHUB_WORKSPACE/local | |
55 | ||
56 | strategy: | |
57 | fail-fast: false | |
58 | matrix: | |
59 | perl-version: | |
60 | - "5.30" | |
61 | - "5.28" | |
62 | - "5.26" | |
63 | - "5.24" | |
64 | - "5.22" | |
65 | - "5.20" | |
66 | - "5.18" | |
67 | - "5.16" | |
68 | - "5.14" | |
69 | - "5.12" | |
70 | - "5.10" | |
71 | ||
72 | needs: ubuntu-latest | |
73 | ||
74 | container: | |
75 | image: perldocker/perl-tester:${{ matrix.perl-version }} | |
76 | ||
77 | steps: | |
78 | - uses: actions/checkout@v2 | |
79 | - name: perl -V | |
80 | run: perl -V | |
81 | - name: Install Dependencies | |
82 | uses: perl-actions/install-with-cpm@v1.3 | |
83 | with: | |
84 | cpanfile: "cpanfile" | |
85 | sudo: false | |
86 | - name: perl Makefile.PL | |
87 | run: perl Makefile.PL | |
88 | - name: make | |
89 | run: make | |
90 | - name: Run Tests | |
91 | run: make test | |
92 | ||
93 | ### | |
94 | ### Windows and macOS testing | |
95 | ### | |
96 | ||
97 | macos: | |
98 | name: macOS Perl v${{ matrix.perl-version }} | |
99 | runs-on: ${{ matrix.os }} | |
100 | strategy: | |
101 | fail-fast: false | |
102 | matrix: | |
103 | os: ["macos-latest"] | |
104 | perl-version: | |
105 | - "5.30" | |
106 | - "5.28" | |
107 | - "5.26" | |
108 | - "5.24" | |
109 | - "5.22" | |
110 | - "5.20" | |
111 | - "5.18" | |
112 | - "5.16" | |
113 | - "5.14" | |
114 | - "5.12" | |
115 | - "5.10" | |
116 | needs: ubuntu-latest | |
117 | steps: | |
118 | - uses: actions/checkout@v2 | |
119 | - name: Set Up Perl | |
120 | uses: shogo82148/actions-setup-perl@v1.3.0 | |
121 | with: | |
122 | perl-version: ${{ matrix.perl-version }} | |
123 | - run: perl -V | |
124 | - name: perl Makefile.PL | |
125 | run: perl Makefile.PL | |
126 | - name: make | |
127 | run: make | |
128 | - name: Run Tests | |
129 | run: make test | |
130 | env: | |
131 | AUTHOR_TESTING: 1 | |
132 | RELEASE_TESTING: 1 | |
133 | ||
134 | windows: | |
135 | name: windows Perl v${{ matrix.perl-version }} | |
136 | runs-on: ${{ matrix.os }} | |
137 | strategy: | |
138 | fail-fast: false | |
139 | matrix: | |
140 | os: ["windows-latest"] | |
141 | perl-version: | |
142 | - "5.30" | |
143 | - "5.28" | |
144 | - "5.26" | |
145 | - "5.24" | |
146 | # make issue <= 5.22 view GH issue https://github.com/shogo82148/actions-setup-perl/issues/223 | |
147 | # - "5.22" | |
148 | # - "5.20.3" | |
149 | # - "5.18.4" | |
150 | # - "5.16.3" | |
151 | # - "5.14.4" | |
152 | # - "5.12.5" | |
153 | # - "5.10.1" | |
154 | needs: ubuntu-latest | |
155 | steps: | |
156 | - uses: actions/checkout@v2 | |
157 | - name: Set Up Perl | |
158 | uses: shogo82148/actions-setup-perl@v1.3.0 | |
159 | with: | |
160 | perl-version: ${{ matrix.perl-version }} | |
161 | - run: perl -V | |
162 | - name: perl Makefile.PL | |
163 | run: perl Makefile.PL | |
164 | - name: make | |
165 | run: make | |
166 | - name: Run Tests | |
167 | run: make test | |
168 | env: | |
169 | AUTHOR_TESTING: 1 | |
170 | RELEASE_TESTING: 1 | |
171 |
10 | 10 | #include <perl.h> |
11 | 11 | #include <XSUB.h> |
12 | 12 | #include <embed.h> |
13 | ||
14 | ||
15 | #define MIN_PERL_VERSION_FOR_COW 20 | |
16 | 13 | |
17 | 14 | #if defined(SV_COW_REFCNT_MAX) |
18 | 15 | # define B_CAN_COW 1 |
0 | This software is copyright (c) 2018 by Nicolas R. | |
1 | ||
2 | This is free software; you can redistribute it and/or modify it under | |
3 | the same terms as the Perl 5 programming language system itself. | |
4 | ||
5 | Terms of the Perl programming language system itself | |
6 | ||
7 | a) the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 1, or (at your option) any | |
9 | later version, or | |
10 | b) the "Artistic License" | |
11 | ||
12 | --- The GNU General Public License, Version 1, February 1989 --- | |
13 | ||
14 | This software is Copyright (c) 2018 by Nicolas R. | |
15 | ||
16 | This is free software, licensed under: | |
17 | ||
18 | The GNU General Public License, Version 1, February 1989 | |
19 | ||
20 | GNU GENERAL PUBLIC LICENSE | |
21 | Version 1, February 1989 | |
22 | ||
23 | Copyright (C) 1989 Free Software Foundation, Inc. | |
24 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
25 | ||
26 | Everyone is permitted to copy and distribute verbatim copies | |
27 | of this license document, but changing it is not allowed. | |
28 | ||
29 | Preamble | |
30 | ||
31 | The license agreements of most software companies try to keep users | |
32 | at the mercy of those companies. By contrast, our General Public | |
33 | License is intended to guarantee your freedom to share and change free | |
34 | software--to make sure the software is free for all its users. The | |
35 | General Public License applies to the Free Software Foundation's | |
36 | software and to any other program whose authors commit to using it. | |
37 | You can use it for your programs, too. | |
38 | ||
39 | When we speak of free software, we are referring to freedom, not | |
40 | price. Specifically, the General Public License is designed to make | |
41 | sure that you have the freedom to give away or sell copies of free | |
42 | software, that you receive source code or can get it if you want it, | |
43 | that you can change the software or use pieces of it in new free | |
44 | programs; and that you know you can do these things. | |
45 | ||
46 | To protect your rights, we need to make restrictions that forbid | |
47 | anyone to deny you these rights or to ask you to surrender the rights. | |
48 | These restrictions translate to certain responsibilities for you if you | |
49 | distribute copies of the software, or if you modify it. | |
50 | ||
51 | For example, if you distribute copies of a such a program, whether | |
52 | gratis or for a fee, you must give the recipients all the rights that | |
53 | you have. You must make sure that they, too, receive or can get the | |
54 | source code. And you must tell them their rights. | |
55 | ||
56 | We protect your rights with two steps: (1) copyright the software, and | |
57 | (2) offer you this license which gives you legal permission to copy, | |
58 | distribute and/or modify the software. | |
59 | ||
60 | Also, for each author's protection and ours, we want to make certain | |
61 | that everyone understands that there is no warranty for this free | |
62 | software. If the software is modified by someone else and passed on, we | |
63 | want its recipients to know that what they have is not the original, so | |
64 | that any problems introduced by others will not reflect on the original | |
65 | authors' reputations. | |
66 | ||
67 | The precise terms and conditions for copying, distribution and | |
68 | modification follow. | |
69 | ||
70 | GNU GENERAL PUBLIC LICENSE | |
71 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
72 | ||
73 | 0. This License Agreement applies to any program or other work which | |
74 | contains a notice placed by the copyright holder saying it may be | |
75 | distributed under the terms of this General Public License. The | |
76 | "Program", below, refers to any such program or work, and a "work based | |
77 | on the Program" means either the Program or any work containing the | |
78 | Program or a portion of it, either verbatim or with modifications. Each | |
79 | licensee is addressed as "you". | |
80 | ||
81 | 1. You may copy and distribute verbatim copies of the Program's source | |
82 | code as you receive it, in any medium, provided that you conspicuously and | |
83 | appropriately publish on each copy an appropriate copyright notice and | |
84 | disclaimer of warranty; keep intact all the notices that refer to this | |
85 | General Public License and to the absence of any warranty; and give any | |
86 | other recipients of the Program a copy of this General Public License | |
87 | along with the Program. You may charge a fee for the physical act of | |
88 | transferring a copy. | |
89 | ||
90 | 2. You may modify your copy or copies of the Program or any portion of | |
91 | it, and copy and distribute such modifications under the terms of Paragraph | |
92 | 1 above, provided that you also do the following: | |
93 | ||
94 | a) cause the modified files to carry prominent notices stating that | |
95 | you changed the files and the date of any change; and | |
96 | ||
97 | b) cause the whole of any work that you distribute or publish, that | |
98 | in whole or in part contains the Program or any part thereof, either | |
99 | with or without modifications, to be licensed at no charge to all | |
100 | third parties under the terms of this General Public License (except | |
101 | that you may choose to grant warranty protection to some or all | |
102 | third parties, at your option). | |
103 | ||
104 | c) If the modified program normally reads commands interactively when | |
105 | run, you must cause it, when started running for such interactive use | |
106 | in the simplest and most usual way, to print or display an | |
107 | announcement including an appropriate copyright notice and a notice | |
108 | that there is no warranty (or else, saying that you provide a | |
109 | warranty) and that users may redistribute the program under these | |
110 | conditions, and telling the user how to view a copy of this General | |
111 | Public License. | |
112 | ||
113 | d) You may charge a fee for the physical act of transferring a | |
114 | copy, and you may at your option offer warranty protection in | |
115 | exchange for a fee. | |
116 | ||
117 | Mere aggregation of another independent work with the Program (or its | |
118 | derivative) on a volume of a storage or distribution medium does not bring | |
119 | the other work under the scope of these terms. | |
120 | ||
121 | 3. You may copy and distribute the Program (or a portion or derivative of | |
122 | it, under Paragraph 2) in object code or executable form under the terms of | |
123 | Paragraphs 1 and 2 above provided that you also do one of the following: | |
124 | ||
125 | a) accompany it with the complete corresponding machine-readable | |
126 | source code, which must be distributed under the terms of | |
127 | Paragraphs 1 and 2 above; or, | |
128 | ||
129 | b) accompany it with a written offer, valid for at least three | |
130 | years, to give any third party free (except for a nominal charge | |
131 | for the cost of distribution) a complete machine-readable copy of the | |
132 | corresponding source code, to be distributed under the terms of | |
133 | Paragraphs 1 and 2 above; or, | |
134 | ||
135 | c) accompany it with the information you received as to where the | |
136 | corresponding source code may be obtained. (This alternative is | |
137 | allowed only for noncommercial distribution and only if you | |
138 | received the program in object code or executable form alone.) | |
139 | ||
140 | Source code for a work means the preferred form of the work for making | |
141 | modifications to it. For an executable file, complete source code means | |
142 | all the source code for all modules it contains; but, as a special | |
143 | exception, it need not include source code for modules which are standard | |
144 | libraries that accompany the operating system on which the executable | |
145 | file runs, or for standard header files or definitions files that | |
146 | accompany that operating system. | |
147 | ||
148 | 4. You may not copy, modify, sublicense, distribute or transfer the | |
149 | Program except as expressly provided under this General Public License. | |
150 | Any attempt otherwise to copy, modify, sublicense, distribute or transfer | |
151 | the Program is void, and will automatically terminate your rights to use | |
152 | the Program under this License. However, parties who have received | |
153 | copies, or rights to use copies, from you under this General Public | |
154 | License will not have their licenses terminated so long as such parties | |
155 | remain in full compliance. | |
156 | ||
157 | 5. By copying, distributing or modifying the Program (or any work based | |
158 | on the Program) you indicate your acceptance of this license to do so, | |
159 | and all its terms and conditions. | |
160 | ||
161 | 6. Each time you redistribute the Program (or any work based on the | |
162 | Program), the recipient automatically receives a license from the original | |
163 | licensor to copy, distribute or modify the Program subject to these | |
164 | terms and conditions. You may not impose any further restrictions on the | |
165 | recipients' exercise of the rights granted herein. | |
166 | ||
167 | 7. The Free Software Foundation may publish revised and/or new versions | |
168 | of the General Public License from time to time. Such new versions will | |
169 | be similar in spirit to the present version, but may differ in detail to | |
170 | address new problems or concerns. | |
171 | ||
172 | Each version is given a distinguishing version number. If the Program | |
173 | specifies a version number of the license which applies to it and "any | |
174 | later version", you have the option of following the terms and conditions | |
175 | either of that version or of any later version published by the Free | |
176 | Software Foundation. If the Program does not specify a version number of | |
177 | the license, you may choose any version ever published by the Free Software | |
178 | Foundation. | |
179 | ||
180 | 8. If you wish to incorporate parts of the Program into other free | |
181 | programs whose distribution conditions are different, write to the author | |
182 | to ask for permission. For software which is copyrighted by the Free | |
183 | Software Foundation, write to the Free Software Foundation; we sometimes | |
184 | make exceptions for this. Our decision will be guided by the two goals | |
185 | of preserving the free status of all derivatives of our free software and | |
186 | of promoting the sharing and reuse of software generally. | |
187 | ||
188 | NO WARRANTY | |
189 | ||
190 | 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | |
191 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | |
192 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | |
193 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | |
194 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
195 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | |
196 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | |
197 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | |
198 | REPAIR OR CORRECTION. | |
199 | ||
200 | 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |
201 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | |
202 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | |
203 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | |
204 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | |
205 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | |
206 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | |
207 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | |
208 | POSSIBILITY OF SUCH DAMAGES. | |
209 | ||
210 | END OF TERMS AND CONDITIONS | |
211 | ||
212 | Appendix: How to Apply These Terms to Your New Programs | |
213 | ||
214 | If you develop a new program, and you want it to be of the greatest | |
215 | possible use to humanity, the best way to achieve this is to make it | |
216 | free software which everyone can redistribute and change under these | |
217 | terms. | |
218 | ||
219 | To do so, attach the following notices to the program. It is safest to | |
220 | attach them to the start of each source file to most effectively convey | |
221 | the exclusion of warranty; and each file should have at least the | |
222 | "copyright" line and a pointer to where the full notice is found. | |
223 | ||
224 | <one line to give the program's name and a brief idea of what it does.> | |
225 | Copyright (C) 19yy <name of author> | |
226 | ||
227 | This program is free software; you can redistribute it and/or modify | |
228 | it under the terms of the GNU General Public License as published by | |
229 | the Free Software Foundation; either version 1, or (at your option) | |
230 | any later version. | |
231 | ||
232 | This program is distributed in the hope that it will be useful, | |
233 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
234 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
235 | GNU General Public License for more details. | |
236 | ||
237 | You should have received a copy of the GNU General Public License | |
238 | along with this program; if not, write to the Free Software | |
239 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA | |
240 | ||
241 | ||
242 | Also add information on how to contact you by electronic and paper mail. | |
243 | ||
244 | If the program is interactive, make it output a short notice like this | |
245 | when it starts in an interactive mode: | |
246 | ||
247 | Gnomovision version 69, Copyright (C) 19xx name of author | |
248 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | |
249 | This is free software, and you are welcome to redistribute it | |
250 | under certain conditions; type `show c' for details. | |
251 | ||
252 | The hypothetical commands `show w' and `show c' should show the | |
253 | appropriate parts of the General Public License. Of course, the | |
254 | commands you use may be called something other than `show w' and `show | |
255 | c'; they could even be mouse-clicks or menu items--whatever suits your | |
256 | program. | |
257 | ||
258 | You should also get your employer (if you work as a programmer) or your | |
259 | school, if any, to sign a "copyright disclaimer" for the program, if | |
260 | necessary. Here a sample; alter the names: | |
261 | ||
262 | Yoyodyne, Inc., hereby disclaims all copyright interest in the | |
263 | program `Gnomovision' (a program to direct compilers to make passes | |
264 | at assemblers) written by James Hacker. | |
265 | ||
266 | <signature of Ty Coon>, 1 April 1989 | |
267 | Ty Coon, President of Vice | |
268 | ||
269 | That's all there is to it! | |
270 | ||
271 | ||
272 | --- The Artistic License 1.0 --- | |
273 | ||
274 | This software is Copyright (c) 2018 by Nicolas R. | |
275 | ||
276 | This is free software, licensed under: | |
277 | ||
278 | The Artistic License 1.0 | |
279 | ||
280 | The Artistic License | |
281 | ||
282 | Preamble | |
283 | ||
284 | The intent of this document is to state the conditions under which a Package | |
285 | may be copied, such that the Copyright Holder maintains some semblance of | |
286 | artistic control over the development of the package, while giving the users of | |
287 | the package the right to use and distribute the Package in a more-or-less | |
288 | customary fashion, plus the right to make reasonable modifications. | |
289 | ||
290 | Definitions: | |
291 | ||
292 | - "Package" refers to the collection of files distributed by the Copyright | |
293 | Holder, and derivatives of that collection of files created through | |
294 | textual modification. | |
295 | - "Standard Version" refers to such a Package if it has not been modified, | |
296 | or has been modified in accordance with the wishes of the Copyright | |
297 | Holder. | |
298 | - "Copyright Holder" is whoever is named in the copyright or copyrights for | |
299 | the package. | |
300 | - "You" is you, if you're thinking about copying or distributing this Package. | |
301 | - "Reasonable copying fee" is whatever you can justify on the basis of media | |
302 | cost, duplication charges, time of people involved, and so on. (You will | |
303 | not be required to justify it to the Copyright Holder, but only to the | |
304 | computing community at large as a market that must bear the fee.) | |
305 | - "Freely Available" means that no fee is charged for the item itself, though | |
306 | there may be fees involved in handling the item. It also means that | |
307 | recipients of the item may redistribute it under the same conditions they | |
308 | received it. | |
309 | ||
310 | 1. You may make and give away verbatim copies of the source form of the | |
311 | Standard Version of this Package without restriction, provided that you | |
312 | duplicate all of the original copyright notices and associated disclaimers. | |
313 | ||
314 | 2. You may apply bug fixes, portability fixes and other modifications derived | |
315 | from the Public Domain or from the Copyright Holder. A Package modified in such | |
316 | a way shall still be considered the Standard Version. | |
317 | ||
318 | 3. You may otherwise modify your copy of this Package in any way, provided that | |
319 | you insert a prominent notice in each changed file stating how and when you | |
320 | changed that file, and provided that you do at least ONE of the following: | |
321 | ||
322 | a) place your modifications in the Public Domain or otherwise make them | |
323 | Freely Available, such as by posting said modifications to Usenet or an | |
324 | equivalent medium, or placing the modifications on a major archive site | |
325 | such as ftp.uu.net, or by allowing the Copyright Holder to include your | |
326 | modifications in the Standard Version of the Package. | |
327 | ||
328 | b) use the modified Package only within your corporation or organization. | |
329 | ||
330 | c) rename any non-standard executables so the names do not conflict with | |
331 | standard executables, which must also be provided, and provide a separate | |
332 | manual page for each non-standard executable that clearly documents how it | |
333 | differs from the Standard Version. | |
334 | ||
335 | d) make other distribution arrangements with the Copyright Holder. | |
336 | ||
337 | 4. You may distribute the programs of this Package in object code or executable | |
338 | form, provided that you do at least ONE of the following: | |
339 | ||
340 | a) distribute a Standard Version of the executables and library files, | |
341 | together with instructions (in the manual page or equivalent) on where to | |
342 | get the Standard Version. | |
343 | ||
344 | b) accompany the distribution with the machine-readable source of the Package | |
345 | with your modifications. | |
346 | ||
347 | c) accompany any non-standard executables with their corresponding Standard | |
348 | Version executables, giving the non-standard executables non-standard | |
349 | names, and clearly documenting the differences in manual pages (or | |
350 | equivalent), together with instructions on where to get the Standard | |
351 | Version. | |
352 | ||
353 | d) make other distribution arrangements with the Copyright Holder. | |
354 | ||
355 | 5. You may charge a reasonable copying fee for any distribution of this | |
356 | Package. You may charge any fee you choose for support of this Package. You | |
357 | may not charge a fee for this Package itself. However, you may distribute this | |
358 | Package in aggregate with other (possibly commercial) programs as part of a | |
359 | larger (possibly commercial) software distribution provided that you do not | |
360 | advertise this Package as a product of your own. | |
361 | ||
362 | 6. The scripts and library files supplied as input to or produced as output | |
363 | from the programs of this Package do not automatically fall under the copyright | |
364 | of this Package, but belong to whomever generated them, and may be sold | |
365 | commercially, and may be aggregated with this Package. | |
366 | ||
367 | 7. C or perl subroutines supplied by you and linked into this Package shall not | |
368 | be considered part of this Package. | |
369 | ||
370 | 8. The name of the Copyright Holder may not be used to endorse or promote | |
371 | products derived from this software without specific prior written permission. | |
372 | ||
373 | 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED | |
374 | WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
375 | MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
376 | ||
377 | The End | |
378 |
0 | # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. | |
0 | .github/workflows/test.yml | |
1 | B-COW-0.004/META.json | |
2 | B-COW-0.004/META.yml | |
3 | Changes | |
1 | 4 | COW.xs |
2 | Changes | |
3 | LICENSE | |
4 | MANIFEST | |
5 | META.json | |
6 | META.yml | |
7 | Makefile.PL | |
8 | README | |
9 | 5 | cpanfile |
10 | 6 | dist.ini |
11 | 7 | examples/synopsis.pl |
12 | 8 | lib/B/COW.pm |
9 | Makefile.PL | |
10 | MANIFEST This list of files | |
11 | README.md | |
13 | 12 | t/00-load.t |
14 | t/00-report-prereqs.dd | |
15 | t/00-report-prereqs.t | |
16 | 13 | t/01-basic.t |
17 | xt/author/00-compile.t | |
18 | xt/author/minimum-version.t | |
19 | xt/author/no-tabs.t | |
20 | xt/author/pod-syntax.t | |
21 | xt/author/synopsis.t | |
22 | xt/release/distmeta.t | |
14 | META.yml Module YAML meta-data (added by MakeMaker) | |
15 | META.json Module JSON meta-data (added by MakeMaker) |
2 | 2 | "author" : [ |
3 | 3 | "Nicolas R. <atoomic@cpan.org>" |
4 | 4 | ], |
5 | "dynamic_config" : 0, | |
6 | "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", | |
5 | "dynamic_config" : 1, | |
6 | "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010", | |
7 | 7 | "license" : [ |
8 | 8 | "perl_5" |
9 | 9 | ], |
12 | 12 | "version" : 2 |
13 | 13 | }, |
14 | 14 | "name" : "B-COW", |
15 | "no_index" : { | |
16 | "directory" : [ | |
17 | "t", | |
18 | "inc" | |
19 | ] | |
20 | }, | |
15 | 21 | "prereqs" : { |
16 | "configure" : { | |
22 | "build" : { | |
17 | 23 | "requires" : { |
18 | 24 | "ExtUtils::MakeMaker" : "0" |
19 | 25 | } |
20 | 26 | }, |
21 | "develop" : { | |
27 | "configure" : { | |
22 | 28 | "requires" : { |
23 | "File::Spec" : "0", | |
24 | "IO::Handle" : "0", | |
25 | "IPC::Open3" : "0", | |
26 | "Test::CPAN::Meta" : "0", | |
27 | "Test::MinimumVersion" : "0", | |
28 | "Test::More" : "0.88", | |
29 | "Test::NoTabs" : "0", | |
30 | "Test::Pod" : "1.41", | |
31 | "Test::Synopsis" : "0" | |
29 | "ExtUtils::MakeMaker" : "0" | |
32 | 30 | } |
33 | 31 | }, |
34 | 32 | "runtime" : { |
37 | 35 | } |
38 | 36 | }, |
39 | 37 | "test" : { |
40 | "recommends" : { | |
41 | "CPAN::Meta" : "2.120900" | |
42 | }, | |
43 | 38 | "requires" : { |
44 | 39 | "Devel::Peek" : "0", |
45 | 40 | "ExtUtils::MakeMaker" : "0", |
48 | 43 | } |
49 | 44 | } |
50 | 45 | }, |
51 | "provides" : { | |
52 | "B::COW" : { | |
53 | "file" : "lib/B/COW.pm", | |
54 | "version" : "0.004" | |
55 | } | |
56 | }, | |
57 | 46 | "release_status" : "stable", |
58 | "resources" : { | |
59 | "bugtracker" : { | |
60 | "web" : "https://github.com/atoomic/B-COW/issues" | |
61 | }, | |
62 | "repository" : { | |
63 | "type" : "git", | |
64 | "url" : "https://github.com/atoomic/B-COW.git", | |
65 | "web" : "https://github.com/atoomic/B-COW.git" | |
66 | } | |
67 | }, | |
68 | 47 | "version" : "0.004", |
69 | "x_Dist_Zilla" : { | |
70 | "perl" : { | |
71 | "version" : "5.030001" | |
72 | }, | |
73 | "plugins" : [ | |
74 | { | |
75 | "class" : "Dist::Zilla::Plugin::OurPkgVersion", | |
76 | "name" : "OurPkgVersion", | |
77 | "version" : "0.21" | |
78 | }, | |
79 | { | |
80 | "class" : "Dist::Zilla::Plugin::Test::Compile", | |
81 | "config" : { | |
82 | "Dist::Zilla::Plugin::Test::Compile" : { | |
83 | "bail_out_on_fail" : 0, | |
84 | "fail_on_warning" : "author", | |
85 | "fake_home" : 0, | |
86 | "filename" : "xt/author/00-compile.t", | |
87 | "module_finder" : [ | |
88 | ":InstallModules" | |
89 | ], | |
90 | "needs_display" : 0, | |
91 | "phase" : "develop", | |
92 | "script_finder" : [ | |
93 | ":PerlExecFiles" | |
94 | ], | |
95 | "skips" : [], | |
96 | "switch" : [] | |
97 | } | |
98 | }, | |
99 | "name" : "Test::Compile", | |
100 | "version" : "2.058" | |
101 | }, | |
102 | { | |
103 | "class" : "Dist::Zilla::Plugin::MetaTests", | |
104 | "name" : "MetaTests", | |
105 | "version" : "6.012" | |
106 | }, | |
107 | { | |
108 | "class" : "Dist::Zilla::Plugin::Test::NoTabs", | |
109 | "config" : { | |
110 | "Dist::Zilla::Plugin::Test::NoTabs" : { | |
111 | "filename" : "xt/author/no-tabs.t", | |
112 | "finder" : [ | |
113 | ":InstallModules", | |
114 | ":ExecFiles", | |
115 | ":TestFiles" | |
116 | ] | |
117 | } | |
118 | }, | |
119 | "name" : "Test::NoTabs", | |
120 | "version" : "0.15" | |
121 | }, | |
122 | { | |
123 | "class" : "Dist::Zilla::Plugin::PodSyntaxTests", | |
124 | "name" : "PodSyntaxTests", | |
125 | "version" : "6.012" | |
126 | }, | |
127 | { | |
128 | "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", | |
129 | "name" : "Test::ReportPrereqs", | |
130 | "version" : "0.027" | |
131 | }, | |
132 | { | |
133 | "class" : "Dist::Zilla::Plugin::PodWeaver", | |
134 | "config" : { | |
135 | "Dist::Zilla::Plugin::PodWeaver" : { | |
136 | "finder" : [ | |
137 | ":InstallModules", | |
138 | ":ExecFiles" | |
139 | ], | |
140 | "plugins" : [ | |
141 | { | |
142 | "class" : "Pod::Weaver::Plugin::EnsurePod5", | |
143 | "name" : "@CorePrep/EnsurePod5", | |
144 | "version" : "4.015" | |
145 | }, | |
146 | { | |
147 | "class" : "Pod::Weaver::Plugin::H1Nester", | |
148 | "name" : "@CorePrep/H1Nester", | |
149 | "version" : "4.015" | |
150 | }, | |
151 | { | |
152 | "class" : "Pod::Weaver::Plugin::SingleEncoding", | |
153 | "name" : "@Default/SingleEncoding", | |
154 | "version" : "4.015" | |
155 | }, | |
156 | { | |
157 | "class" : "Pod::Weaver::Section::Name", | |
158 | "name" : "@Default/Name", | |
159 | "version" : "4.015" | |
160 | }, | |
161 | { | |
162 | "class" : "Pod::Weaver::Section::Version", | |
163 | "name" : "@Default/Version", | |
164 | "version" : "4.015" | |
165 | }, | |
166 | { | |
167 | "class" : "Pod::Weaver::Section::Region", | |
168 | "name" : "@Default/prelude", | |
169 | "version" : "4.015" | |
170 | }, | |
171 | { | |
172 | "class" : "Pod::Weaver::Section::Generic", | |
173 | "name" : "SYNOPSIS", | |
174 | "version" : "4.015" | |
175 | }, | |
176 | { | |
177 | "class" : "Pod::Weaver::Section::Generic", | |
178 | "name" : "DESCRIPTION", | |
179 | "version" : "4.015" | |
180 | }, | |
181 | { | |
182 | "class" : "Pod::Weaver::Section::Generic", | |
183 | "name" : "OVERVIEW", | |
184 | "version" : "4.015" | |
185 | }, | |
186 | { | |
187 | "class" : "Pod::Weaver::Section::Collect", | |
188 | "name" : "ATTRIBUTES", | |
189 | "version" : "4.015" | |
190 | }, | |
191 | { | |
192 | "class" : "Pod::Weaver::Section::Collect", | |
193 | "name" : "METHODS", | |
194 | "version" : "4.015" | |
195 | }, | |
196 | { | |
197 | "class" : "Pod::Weaver::Section::Collect", | |
198 | "name" : "FUNCTIONS", | |
199 | "version" : "4.015" | |
200 | }, | |
201 | { | |
202 | "class" : "Pod::Weaver::Section::Leftovers", | |
203 | "name" : "@Default/Leftovers", | |
204 | "version" : "4.015" | |
205 | }, | |
206 | { | |
207 | "class" : "Pod::Weaver::Section::Region", | |
208 | "name" : "@Default/postlude", | |
209 | "version" : "4.015" | |
210 | }, | |
211 | { | |
212 | "class" : "Pod::Weaver::Section::Authors", | |
213 | "name" : "@Default/Authors", | |
214 | "version" : "4.015" | |
215 | }, | |
216 | { | |
217 | "class" : "Pod::Weaver::Section::Legal", | |
218 | "name" : "@Default/Legal", | |
219 | "version" : "4.015" | |
220 | } | |
221 | ] | |
222 | } | |
223 | }, | |
224 | "name" : "PodWeaver", | |
225 | "version" : "4.008" | |
226 | }, | |
227 | { | |
228 | "class" : "Dist::Zilla::Plugin::RunExtraTests", | |
229 | "config" : { | |
230 | "Dist::Zilla::Role::TestRunner" : { | |
231 | "default_jobs" : 1 | |
232 | } | |
233 | }, | |
234 | "name" : "RunExtraTests", | |
235 | "version" : "0.029" | |
236 | }, | |
237 | { | |
238 | "class" : "Dist::Zilla::Plugin::MetaJSON", | |
239 | "name" : "MetaJSON", | |
240 | "version" : "6.012" | |
241 | }, | |
242 | { | |
243 | "class" : "Dist::Zilla::Plugin::MinimumPerlFast", | |
244 | "name" : "MinimumPerlFast", | |
245 | "version" : "0.003" | |
246 | }, | |
247 | { | |
248 | "class" : "Dist::Zilla::Plugin::MetaConfig", | |
249 | "name" : "MetaConfig", | |
250 | "version" : "6.012" | |
251 | }, | |
252 | { | |
253 | "class" : "Dist::Zilla::Plugin::MetaProvides::Package", | |
254 | "config" : { | |
255 | "Dist::Zilla::Plugin::MetaProvides::Package" : { | |
256 | "finder_objects" : [ | |
257 | { | |
258 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
259 | "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", | |
260 | "version" : "6.012" | |
261 | } | |
262 | ], | |
263 | "include_underscores" : 0 | |
264 | }, | |
265 | "Dist::Zilla::Role::MetaProvider::Provider" : { | |
266 | "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", | |
267 | "inherit_missing" : 1, | |
268 | "inherit_version" : 1, | |
269 | "meta_noindex" : 1 | |
270 | }, | |
271 | "Dist::Zilla::Role::ModuleMetadata" : { | |
272 | "Module::Metadata" : "1.000036", | |
273 | "version" : "0.006" | |
274 | } | |
275 | }, | |
276 | "name" : "MetaProvides::Package", | |
277 | "version" : "2.004003" | |
278 | }, | |
279 | { | |
280 | "class" : "Dist::Zilla::Plugin::NextRelease", | |
281 | "name" : "NextRelease", | |
282 | "version" : "6.012" | |
283 | }, | |
284 | { | |
285 | "class" : "Dist::Zilla::Plugin::Git::Push", | |
286 | "config" : { | |
287 | "Dist::Zilla::Plugin::Git::Push" : { | |
288 | "push_to" : [ | |
289 | "gh", | |
290 | "gh HEAD:refs/heads/released" | |
291 | ], | |
292 | "remotes_must_exist" : 1 | |
293 | }, | |
294 | "Dist::Zilla::Role::Git::Repo" : { | |
295 | "git_version" : "2.24.2 (Apple Git-127)", | |
296 | "repo_root" : "." | |
297 | } | |
298 | }, | |
299 | "name" : "Git::Push", | |
300 | "version" : "2.046" | |
301 | }, | |
302 | { | |
303 | "class" : "Dist::Zilla::Plugin::Prereqs", | |
304 | "config" : { | |
305 | "Dist::Zilla::Plugin::Prereqs" : { | |
306 | "phase" : "test", | |
307 | "type" : "requires" | |
308 | } | |
309 | }, | |
310 | "name" : "TestRequires", | |
311 | "version" : "6.012" | |
312 | }, | |
313 | { | |
314 | "class" : "Dist::Zilla::Plugin::TestRelease", | |
315 | "name" : "TestRelease", | |
316 | "version" : "6.012" | |
317 | }, | |
318 | { | |
319 | "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", | |
320 | "config" : { | |
321 | "Dist::Zilla::Plugin::Test::MinimumVersion" : { | |
322 | "max_target_perl" : "5.008" | |
323 | } | |
324 | }, | |
325 | "name" : "Test::MinimumVersion", | |
326 | "version" : "2.000010" | |
327 | }, | |
328 | { | |
329 | "class" : "Dist::Zilla::Plugin::Git::Check", | |
330 | "config" : { | |
331 | "Dist::Zilla::Plugin::Git::Check" : { | |
332 | "untracked_files" : "die" | |
333 | }, | |
334 | "Dist::Zilla::Role::Git::DirtyFiles" : { | |
335 | "allow_dirty" : [ | |
336 | "Changes", | |
337 | "README.mkdn", | |
338 | "dist.ini" | |
339 | ], | |
340 | "allow_dirty_match" : [], | |
341 | "changelog" : "Changes" | |
342 | }, | |
343 | "Dist::Zilla::Role::Git::Repo" : { | |
344 | "git_version" : "2.24.2 (Apple Git-127)", | |
345 | "repo_root" : "." | |
346 | } | |
347 | }, | |
348 | "name" : "@Git/Check", | |
349 | "version" : "2.046" | |
350 | }, | |
351 | { | |
352 | "class" : "Dist::Zilla::Plugin::Git::Commit", | |
353 | "config" : { | |
354 | "Dist::Zilla::Plugin::Git::Commit" : { | |
355 | "add_files_in" : [ | |
356 | "Changes", | |
357 | "README.mkdn", | |
358 | "dist.ini" | |
359 | ], | |
360 | "commit_msg" : "v%V%n%n%c" | |
361 | }, | |
362 | "Dist::Zilla::Role::Git::DirtyFiles" : { | |
363 | "allow_dirty" : [ | |
364 | "Changes", | |
365 | "README.mkdn", | |
366 | "dist.ini" | |
367 | ], | |
368 | "allow_dirty_match" : [], | |
369 | "changelog" : "Changes" | |
370 | }, | |
371 | "Dist::Zilla::Role::Git::Repo" : { | |
372 | "git_version" : "2.24.2 (Apple Git-127)", | |
373 | "repo_root" : "." | |
374 | }, | |
375 | "Dist::Zilla::Role::Git::StringFormatter" : { | |
376 | "time_zone" : "local" | |
377 | } | |
378 | }, | |
379 | "name" : "@Git/Commit", | |
380 | "version" : "2.046" | |
381 | }, | |
382 | { | |
383 | "class" : "Dist::Zilla::Plugin::Git::Tag", | |
384 | "config" : { | |
385 | "Dist::Zilla::Plugin::Git::Tag" : { | |
386 | "branch" : null, | |
387 | "changelog" : "Changes", | |
388 | "signed" : 0, | |
389 | "tag" : "v0.004", | |
390 | "tag_format" : "v%V", | |
391 | "tag_message" : "v%V" | |
392 | }, | |
393 | "Dist::Zilla::Role::Git::Repo" : { | |
394 | "git_version" : "2.24.2 (Apple Git-127)", | |
395 | "repo_root" : "." | |
396 | }, | |
397 | "Dist::Zilla::Role::Git::StringFormatter" : { | |
398 | "time_zone" : "local" | |
399 | } | |
400 | }, | |
401 | "name" : "@Git/Tag", | |
402 | "version" : "2.046" | |
403 | }, | |
404 | { | |
405 | "class" : "Dist::Zilla::Plugin::Git::Push", | |
406 | "config" : { | |
407 | "Dist::Zilla::Plugin::Git::Push" : { | |
408 | "push_to" : [ | |
409 | "gh", | |
410 | "gh HEAD:refs/heads/released" | |
411 | ], | |
412 | "remotes_must_exist" : 1 | |
413 | }, | |
414 | "Dist::Zilla::Role::Git::Repo" : { | |
415 | "git_version" : "2.24.2 (Apple Git-127)", | |
416 | "repo_root" : "." | |
417 | } | |
418 | }, | |
419 | "name" : "@Git/Push", | |
420 | "version" : "2.046" | |
421 | }, | |
422 | { | |
423 | "class" : "Dist::Zilla::Plugin::Run::BeforeBuild", | |
424 | "config" : { | |
425 | "Dist::Zilla::Plugin::Run::Role::Runner" : { | |
426 | "fatal_errors" : 1, | |
427 | "quiet" : 0, | |
428 | "version" : "0.048" | |
429 | } | |
430 | }, | |
431 | "name" : "Run::BeforeBuild", | |
432 | "version" : "0.048" | |
433 | }, | |
434 | { | |
435 | "class" : "Dist::Zilla::Plugin::Run::AfterBuild", | |
436 | "config" : { | |
437 | "Dist::Zilla::Plugin::Run::Role::Runner" : { | |
438 | "fatal_errors" : 1, | |
439 | "quiet" : 0, | |
440 | "run" : [ | |
441 | "cp %d/Makefile.PL ./", | |
442 | "git status --porcelain | grep 'M Makefile.PL' && git commit -m 'Makefile.PL auto-updated by dist.ini' Makefile.PL && echo \"# Makefile.PL auto-update\" || echo \"# Makefile.PL up to date\"" | |
443 | ], | |
444 | "version" : "0.048" | |
445 | } | |
446 | }, | |
447 | "name" : "Run::AfterBuild", | |
448 | "version" : "0.048" | |
449 | }, | |
450 | { | |
451 | "class" : "Dist::Zilla::Plugin::Git::NextVersion", | |
452 | "config" : { | |
453 | "Dist::Zilla::Plugin::Git::NextVersion" : { | |
454 | "first_version" : "0.001", | |
455 | "version_by_branch" : 0, | |
456 | "version_regexp" : "(?^:^v(.+)$)" | |
457 | }, | |
458 | "Dist::Zilla::Role::Git::Repo" : { | |
459 | "git_version" : "2.24.2 (Apple Git-127)", | |
460 | "repo_root" : "." | |
461 | } | |
462 | }, | |
463 | "name" : "Git::NextVersion", | |
464 | "version" : "2.046" | |
465 | }, | |
466 | { | |
467 | "class" : "Dist::Zilla::Plugin::PruneCruft", | |
468 | "name" : "@Filter/PruneCruft", | |
469 | "version" : "6.012" | |
470 | }, | |
471 | { | |
472 | "class" : "Dist::Zilla::Plugin::ManifestSkip", | |
473 | "name" : "@Filter/ManifestSkip", | |
474 | "version" : "6.012" | |
475 | }, | |
476 | { | |
477 | "class" : "Dist::Zilla::Plugin::MetaYAML", | |
478 | "name" : "@Filter/MetaYAML", | |
479 | "version" : "6.012" | |
480 | }, | |
481 | { | |
482 | "class" : "Dist::Zilla::Plugin::License", | |
483 | "name" : "@Filter/License", | |
484 | "version" : "6.012" | |
485 | }, | |
486 | { | |
487 | "class" : "Dist::Zilla::Plugin::Readme", | |
488 | "name" : "@Filter/Readme", | |
489 | "version" : "6.012" | |
490 | }, | |
491 | { | |
492 | "class" : "Dist::Zilla::Plugin::ExecDir", | |
493 | "name" : "@Filter/ExecDir", | |
494 | "version" : "6.012" | |
495 | }, | |
496 | { | |
497 | "class" : "Dist::Zilla::Plugin::ShareDir", | |
498 | "name" : "@Filter/ShareDir", | |
499 | "version" : "6.012" | |
500 | }, | |
501 | { | |
502 | "class" : "Dist::Zilla::Plugin::MakeMaker", | |
503 | "config" : { | |
504 | "Dist::Zilla::Role::TestRunner" : { | |
505 | "default_jobs" : 1 | |
506 | } | |
507 | }, | |
508 | "name" : "@Filter/MakeMaker", | |
509 | "version" : "6.012" | |
510 | }, | |
511 | { | |
512 | "class" : "Dist::Zilla::Plugin::Manifest", | |
513 | "name" : "@Filter/Manifest", | |
514 | "version" : "6.012" | |
515 | }, | |
516 | { | |
517 | "class" : "Dist::Zilla::Plugin::TestRelease", | |
518 | "name" : "@Filter/TestRelease", | |
519 | "version" : "6.012" | |
520 | }, | |
521 | { | |
522 | "class" : "Dist::Zilla::Plugin::ConfirmRelease", | |
523 | "name" : "@Filter/ConfirmRelease", | |
524 | "version" : "6.012" | |
525 | }, | |
526 | { | |
527 | "class" : "Dist::Zilla::Plugin::UploadToCPAN", | |
528 | "name" : "@Filter/UploadToCPAN", | |
529 | "version" : "6.012" | |
530 | }, | |
531 | { | |
532 | "class" : "Dist::Zilla::Plugin::GatherDir", | |
533 | "config" : { | |
534 | "Dist::Zilla::Plugin::GatherDir" : { | |
535 | "exclude_filename" : [ | |
536 | "Makefile.PL" | |
537 | ], | |
538 | "exclude_match" : [], | |
539 | "follow_symlinks" : 0, | |
540 | "include_dotfiles" : 0, | |
541 | "prefix" : "", | |
542 | "prune_directory" : [], | |
543 | "root" : "." | |
544 | } | |
545 | }, | |
546 | "name" : "GatherDir", | |
547 | "version" : "6.012" | |
548 | }, | |
549 | { | |
550 | "class" : "Dist::Zilla::Plugin::MetaResources", | |
551 | "name" : "MetaResources", | |
552 | "version" : "6.012" | |
553 | }, | |
554 | { | |
555 | "class" : "Dist::Zilla::Plugin::PruneFiles", | |
556 | "name" : "PruneFiles", | |
557 | "version" : "6.012" | |
558 | }, | |
559 | { | |
560 | "class" : "Dist::Zilla::Plugin::InsertExample", | |
561 | "name" : "InsertExample", | |
562 | "version" : "0.09" | |
563 | }, | |
564 | { | |
565 | "class" : "Dist::Zilla::Plugin::Test::Synopsis", | |
566 | "name" : "Test::Synopsis", | |
567 | "version" : "2.000007" | |
568 | }, | |
569 | { | |
570 | "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", | |
571 | "config" : { | |
572 | "Dist::Zilla::Role::FileWatcher" : { | |
573 | "version" : "0.006" | |
574 | } | |
575 | }, | |
576 | "name" : "ReadmeAnyFromPod", | |
577 | "version" : "0.163250" | |
578 | }, | |
579 | { | |
580 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
581 | "name" : ":InstallModules", | |
582 | "version" : "6.012" | |
583 | }, | |
584 | { | |
585 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
586 | "name" : ":IncModules", | |
587 | "version" : "6.012" | |
588 | }, | |
589 | { | |
590 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
591 | "name" : ":TestFiles", | |
592 | "version" : "6.012" | |
593 | }, | |
594 | { | |
595 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
596 | "name" : ":ExtraTestFiles", | |
597 | "version" : "6.012" | |
598 | }, | |
599 | { | |
600 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
601 | "name" : ":ExecFiles", | |
602 | "version" : "6.012" | |
603 | }, | |
604 | { | |
605 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
606 | "name" : ":PerlExecFiles", | |
607 | "version" : "6.012" | |
608 | }, | |
609 | { | |
610 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
611 | "name" : ":ShareFiles", | |
612 | "version" : "6.012" | |
613 | }, | |
614 | { | |
615 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
616 | "name" : ":MainModule", | |
617 | "version" : "6.012" | |
618 | }, | |
619 | { | |
620 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
621 | "name" : ":AllFiles", | |
622 | "version" : "6.012" | |
623 | }, | |
624 | { | |
625 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
626 | "name" : ":NoFiles", | |
627 | "version" : "6.012" | |
628 | }, | |
629 | { | |
630 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
631 | "name" : "MetaProvides::Package/AUTOVIV/:InstallModulesPM", | |
632 | "version" : "6.012" | |
633 | } | |
634 | ], | |
635 | "zilla" : { | |
636 | "class" : "Dist::Zilla::Dist::Builder", | |
637 | "config" : { | |
638 | "is_trial" : 0 | |
639 | }, | |
640 | "version" : "6.012" | |
641 | } | |
642 | }, | |
643 | "x_generated_by_perl" : "v5.30.1", | |
644 | "x_serialization_backend" : "Cpanel::JSON::XS version 4.19" | |
48 | "x_serialization_backend" : "JSON::PP version 4.04" | |
645 | 49 | } |
646 |
8 | 8 | Test::More: '0' |
9 | 9 | configure_requires: |
10 | 10 | ExtUtils::MakeMaker: '0' |
11 | dynamic_config: 0 | |
12 | generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' | |
11 | dynamic_config: 1 | |
12 | generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010' | |
13 | 13 | license: perl |
14 | 14 | meta-spec: |
15 | 15 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
16 | 16 | version: '1.4' |
17 | 17 | name: B-COW |
18 | provides: | |
19 | B::COW: | |
20 | file: lib/B/COW.pm | |
21 | version: '0.004' | |
18 | no_index: | |
19 | directory: | |
20 | - t | |
21 | - inc | |
22 | 22 | requires: |
23 | 23 | perl: '5.008' |
24 | resources: | |
25 | bugtracker: https://github.com/atoomic/B-COW/issues | |
26 | repository: https://github.com/atoomic/B-COW.git | |
27 | 24 | version: '0.004' |
28 | x_Dist_Zilla: | |
29 | perl: | |
30 | version: '5.030001' | |
31 | plugins: | |
32 | - | |
33 | class: Dist::Zilla::Plugin::OurPkgVersion | |
34 | name: OurPkgVersion | |
35 | version: '0.21' | |
36 | - | |
37 | class: Dist::Zilla::Plugin::Test::Compile | |
38 | config: | |
39 | Dist::Zilla::Plugin::Test::Compile: | |
40 | bail_out_on_fail: '0' | |
41 | fail_on_warning: author | |
42 | fake_home: 0 | |
43 | filename: xt/author/00-compile.t | |
44 | module_finder: | |
45 | - ':InstallModules' | |
46 | needs_display: 0 | |
47 | phase: develop | |
48 | script_finder: | |
49 | - ':PerlExecFiles' | |
50 | skips: [] | |
51 | switch: [] | |
52 | name: Test::Compile | |
53 | version: '2.058' | |
54 | - | |
55 | class: Dist::Zilla::Plugin::MetaTests | |
56 | name: MetaTests | |
57 | version: '6.012' | |
58 | - | |
59 | class: Dist::Zilla::Plugin::Test::NoTabs | |
60 | config: | |
61 | Dist::Zilla::Plugin::Test::NoTabs: | |
62 | filename: xt/author/no-tabs.t | |
63 | finder: | |
64 | - ':InstallModules' | |
65 | - ':ExecFiles' | |
66 | - ':TestFiles' | |
67 | name: Test::NoTabs | |
68 | version: '0.15' | |
69 | - | |
70 | class: Dist::Zilla::Plugin::PodSyntaxTests | |
71 | name: PodSyntaxTests | |
72 | version: '6.012' | |
73 | - | |
74 | class: Dist::Zilla::Plugin::Test::ReportPrereqs | |
75 | name: Test::ReportPrereqs | |
76 | version: '0.027' | |
77 | - | |
78 | class: Dist::Zilla::Plugin::PodWeaver | |
79 | config: | |
80 | Dist::Zilla::Plugin::PodWeaver: | |
81 | finder: | |
82 | - ':InstallModules' | |
83 | - ':ExecFiles' | |
84 | plugins: | |
85 | - | |
86 | class: Pod::Weaver::Plugin::EnsurePod5 | |
87 | name: '@CorePrep/EnsurePod5' | |
88 | version: '4.015' | |
89 | - | |
90 | class: Pod::Weaver::Plugin::H1Nester | |
91 | name: '@CorePrep/H1Nester' | |
92 | version: '4.015' | |
93 | - | |
94 | class: Pod::Weaver::Plugin::SingleEncoding | |
95 | name: '@Default/SingleEncoding' | |
96 | version: '4.015' | |
97 | - | |
98 | class: Pod::Weaver::Section::Name | |
99 | name: '@Default/Name' | |
100 | version: '4.015' | |
101 | - | |
102 | class: Pod::Weaver::Section::Version | |
103 | name: '@Default/Version' | |
104 | version: '4.015' | |
105 | - | |
106 | class: Pod::Weaver::Section::Region | |
107 | name: '@Default/prelude' | |
108 | version: '4.015' | |
109 | - | |
110 | class: Pod::Weaver::Section::Generic | |
111 | name: SYNOPSIS | |
112 | version: '4.015' | |
113 | - | |
114 | class: Pod::Weaver::Section::Generic | |
115 | name: DESCRIPTION | |
116 | version: '4.015' | |
117 | - | |
118 | class: Pod::Weaver::Section::Generic | |
119 | name: OVERVIEW | |
120 | version: '4.015' | |
121 | - | |
122 | class: Pod::Weaver::Section::Collect | |
123 | name: ATTRIBUTES | |
124 | version: '4.015' | |
125 | - | |
126 | class: Pod::Weaver::Section::Collect | |
127 | name: METHODS | |
128 | version: '4.015' | |
129 | - | |
130 | class: Pod::Weaver::Section::Collect | |
131 | name: FUNCTIONS | |
132 | version: '4.015' | |
133 | - | |
134 | class: Pod::Weaver::Section::Leftovers | |
135 | name: '@Default/Leftovers' | |
136 | version: '4.015' | |
137 | - | |
138 | class: Pod::Weaver::Section::Region | |
139 | name: '@Default/postlude' | |
140 | version: '4.015' | |
141 | - | |
142 | class: Pod::Weaver::Section::Authors | |
143 | name: '@Default/Authors' | |
144 | version: '4.015' | |
145 | - | |
146 | class: Pod::Weaver::Section::Legal | |
147 | name: '@Default/Legal' | |
148 | version: '4.015' | |
149 | name: PodWeaver | |
150 | version: '4.008' | |
151 | - | |
152 | class: Dist::Zilla::Plugin::RunExtraTests | |
153 | config: | |
154 | Dist::Zilla::Role::TestRunner: | |
155 | default_jobs: 1 | |
156 | name: RunExtraTests | |
157 | version: '0.029' | |
158 | - | |
159 | class: Dist::Zilla::Plugin::MetaJSON | |
160 | name: MetaJSON | |
161 | version: '6.012' | |
162 | - | |
163 | class: Dist::Zilla::Plugin::MinimumPerlFast | |
164 | name: MinimumPerlFast | |
165 | version: '0.003' | |
166 | - | |
167 | class: Dist::Zilla::Plugin::MetaConfig | |
168 | name: MetaConfig | |
169 | version: '6.012' | |
170 | - | |
171 | class: Dist::Zilla::Plugin::MetaProvides::Package | |
172 | config: | |
173 | Dist::Zilla::Plugin::MetaProvides::Package: | |
174 | finder_objects: | |
175 | - | |
176 | class: Dist::Zilla::Plugin::FinderCode | |
177 | name: MetaProvides::Package/AUTOVIV/:InstallModulesPM | |
178 | version: '6.012' | |
179 | include_underscores: 0 | |
180 | Dist::Zilla::Role::MetaProvider::Provider: | |
181 | $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' | |
182 | inherit_missing: '1' | |
183 | inherit_version: '1' | |
184 | meta_noindex: '1' | |
185 | Dist::Zilla::Role::ModuleMetadata: | |
186 | Module::Metadata: '1.000036' | |
187 | version: '0.006' | |
188 | name: MetaProvides::Package | |
189 | version: '2.004003' | |
190 | - | |
191 | class: Dist::Zilla::Plugin::NextRelease | |
192 | name: NextRelease | |
193 | version: '6.012' | |
194 | - | |
195 | class: Dist::Zilla::Plugin::Git::Push | |
196 | config: | |
197 | Dist::Zilla::Plugin::Git::Push: | |
198 | push_to: | |
199 | - gh | |
200 | - 'gh HEAD:refs/heads/released' | |
201 | remotes_must_exist: 1 | |
202 | Dist::Zilla::Role::Git::Repo: | |
203 | git_version: '2.24.2 (Apple Git-127)' | |
204 | repo_root: . | |
205 | name: Git::Push | |
206 | version: '2.046' | |
207 | - | |
208 | class: Dist::Zilla::Plugin::Prereqs | |
209 | config: | |
210 | Dist::Zilla::Plugin::Prereqs: | |
211 | phase: test | |
212 | type: requires | |
213 | name: TestRequires | |
214 | version: '6.012' | |
215 | - | |
216 | class: Dist::Zilla::Plugin::TestRelease | |
217 | name: TestRelease | |
218 | version: '6.012' | |
219 | - | |
220 | class: Dist::Zilla::Plugin::Test::MinimumVersion | |
221 | config: | |
222 | Dist::Zilla::Plugin::Test::MinimumVersion: | |
223 | max_target_perl: '5.008' | |
224 | name: Test::MinimumVersion | |
225 | version: '2.000010' | |
226 | - | |
227 | class: Dist::Zilla::Plugin::Git::Check | |
228 | config: | |
229 | Dist::Zilla::Plugin::Git::Check: | |
230 | untracked_files: die | |
231 | Dist::Zilla::Role::Git::DirtyFiles: | |
232 | allow_dirty: | |
233 | - Changes | |
234 | - README.mkdn | |
235 | - dist.ini | |
236 | allow_dirty_match: [] | |
237 | changelog: Changes | |
238 | Dist::Zilla::Role::Git::Repo: | |
239 | git_version: '2.24.2 (Apple Git-127)' | |
240 | repo_root: . | |
241 | name: '@Git/Check' | |
242 | version: '2.046' | |
243 | - | |
244 | class: Dist::Zilla::Plugin::Git::Commit | |
245 | config: | |
246 | Dist::Zilla::Plugin::Git::Commit: | |
247 | add_files_in: | |
248 | - Changes | |
249 | - README.mkdn | |
250 | - dist.ini | |
251 | commit_msg: v%V%n%n%c | |
252 | Dist::Zilla::Role::Git::DirtyFiles: | |
253 | allow_dirty: | |
254 | - Changes | |
255 | - README.mkdn | |
256 | - dist.ini | |
257 | allow_dirty_match: [] | |
258 | changelog: Changes | |
259 | Dist::Zilla::Role::Git::Repo: | |
260 | git_version: '2.24.2 (Apple Git-127)' | |
261 | repo_root: . | |
262 | Dist::Zilla::Role::Git::StringFormatter: | |
263 | time_zone: local | |
264 | name: '@Git/Commit' | |
265 | version: '2.046' | |
266 | - | |
267 | class: Dist::Zilla::Plugin::Git::Tag | |
268 | config: | |
269 | Dist::Zilla::Plugin::Git::Tag: | |
270 | branch: ~ | |
271 | changelog: Changes | |
272 | signed: 0 | |
273 | tag: v0.004 | |
274 | tag_format: v%V | |
275 | tag_message: v%V | |
276 | Dist::Zilla::Role::Git::Repo: | |
277 | git_version: '2.24.2 (Apple Git-127)' | |
278 | repo_root: . | |
279 | Dist::Zilla::Role::Git::StringFormatter: | |
280 | time_zone: local | |
281 | name: '@Git/Tag' | |
282 | version: '2.046' | |
283 | - | |
284 | class: Dist::Zilla::Plugin::Git::Push | |
285 | config: | |
286 | Dist::Zilla::Plugin::Git::Push: | |
287 | push_to: | |
288 | - gh | |
289 | - 'gh HEAD:refs/heads/released' | |
290 | remotes_must_exist: 1 | |
291 | Dist::Zilla::Role::Git::Repo: | |
292 | git_version: '2.24.2 (Apple Git-127)' | |
293 | repo_root: . | |
294 | name: '@Git/Push' | |
295 | version: '2.046' | |
296 | - | |
297 | class: Dist::Zilla::Plugin::Run::BeforeBuild | |
298 | config: | |
299 | Dist::Zilla::Plugin::Run::Role::Runner: | |
300 | fatal_errors: 1 | |
301 | quiet: 0 | |
302 | version: '0.048' | |
303 | name: Run::BeforeBuild | |
304 | version: '0.048' | |
305 | - | |
306 | class: Dist::Zilla::Plugin::Run::AfterBuild | |
307 | config: | |
308 | Dist::Zilla::Plugin::Run::Role::Runner: | |
309 | fatal_errors: 1 | |
310 | quiet: 0 | |
311 | run: | |
312 | - 'cp %d/Makefile.PL ./' | |
313 | - "git status --porcelain | grep 'M Makefile.PL' && git commit -m 'Makefile.PL auto-updated by dist.ini' Makefile.PL && echo \"# Makefile.PL auto-update\" || echo \"# Makefile.PL up to date\"" | |
314 | version: '0.048' | |
315 | name: Run::AfterBuild | |
316 | version: '0.048' | |
317 | - | |
318 | class: Dist::Zilla::Plugin::Git::NextVersion | |
319 | config: | |
320 | Dist::Zilla::Plugin::Git::NextVersion: | |
321 | first_version: '0.001' | |
322 | version_by_branch: 0 | |
323 | version_regexp: (?^:^v(.+)$) | |
324 | Dist::Zilla::Role::Git::Repo: | |
325 | git_version: '2.24.2 (Apple Git-127)' | |
326 | repo_root: . | |
327 | name: Git::NextVersion | |
328 | version: '2.046' | |
329 | - | |
330 | class: Dist::Zilla::Plugin::PruneCruft | |
331 | name: '@Filter/PruneCruft' | |
332 | version: '6.012' | |
333 | - | |
334 | class: Dist::Zilla::Plugin::ManifestSkip | |
335 | name: '@Filter/ManifestSkip' | |
336 | version: '6.012' | |
337 | - | |
338 | class: Dist::Zilla::Plugin::MetaYAML | |
339 | name: '@Filter/MetaYAML' | |
340 | version: '6.012' | |
341 | - | |
342 | class: Dist::Zilla::Plugin::License | |
343 | name: '@Filter/License' | |
344 | version: '6.012' | |
345 | - | |
346 | class: Dist::Zilla::Plugin::Readme | |
347 | name: '@Filter/Readme' | |
348 | version: '6.012' | |
349 | - | |
350 | class: Dist::Zilla::Plugin::ExecDir | |
351 | name: '@Filter/ExecDir' | |
352 | version: '6.012' | |
353 | - | |
354 | class: Dist::Zilla::Plugin::ShareDir | |
355 | name: '@Filter/ShareDir' | |
356 | version: '6.012' | |
357 | - | |
358 | class: Dist::Zilla::Plugin::MakeMaker | |
359 | config: | |
360 | Dist::Zilla::Role::TestRunner: | |
361 | default_jobs: 1 | |
362 | name: '@Filter/MakeMaker' | |
363 | version: '6.012' | |
364 | - | |
365 | class: Dist::Zilla::Plugin::Manifest | |
366 | name: '@Filter/Manifest' | |
367 | version: '6.012' | |
368 | - | |
369 | class: Dist::Zilla::Plugin::TestRelease | |
370 | name: '@Filter/TestRelease' | |
371 | version: '6.012' | |
372 | - | |
373 | class: Dist::Zilla::Plugin::ConfirmRelease | |
374 | name: '@Filter/ConfirmRelease' | |
375 | version: '6.012' | |
376 | - | |
377 | class: Dist::Zilla::Plugin::UploadToCPAN | |
378 | name: '@Filter/UploadToCPAN' | |
379 | version: '6.012' | |
380 | - | |
381 | class: Dist::Zilla::Plugin::GatherDir | |
382 | config: | |
383 | Dist::Zilla::Plugin::GatherDir: | |
384 | exclude_filename: | |
385 | - Makefile.PL | |
386 | exclude_match: [] | |
387 | follow_symlinks: 0 | |
388 | include_dotfiles: 0 | |
389 | prefix: '' | |
390 | prune_directory: [] | |
391 | root: . | |
392 | name: GatherDir | |
393 | version: '6.012' | |
394 | - | |
395 | class: Dist::Zilla::Plugin::MetaResources | |
396 | name: MetaResources | |
397 | version: '6.012' | |
398 | - | |
399 | class: Dist::Zilla::Plugin::PruneFiles | |
400 | name: PruneFiles | |
401 | version: '6.012' | |
402 | - | |
403 | class: Dist::Zilla::Plugin::InsertExample | |
404 | name: InsertExample | |
405 | version: '0.09' | |
406 | - | |
407 | class: Dist::Zilla::Plugin::Test::Synopsis | |
408 | name: Test::Synopsis | |
409 | version: '2.000007' | |
410 | - | |
411 | class: Dist::Zilla::Plugin::ReadmeAnyFromPod | |
412 | config: | |
413 | Dist::Zilla::Role::FileWatcher: | |
414 | version: '0.006' | |
415 | name: ReadmeAnyFromPod | |
416 | version: '0.163250' | |
417 | - | |
418 | class: Dist::Zilla::Plugin::FinderCode | |
419 | name: ':InstallModules' | |
420 | version: '6.012' | |
421 | - | |
422 | class: Dist::Zilla::Plugin::FinderCode | |
423 | name: ':IncModules' | |
424 | version: '6.012' | |
425 | - | |
426 | class: Dist::Zilla::Plugin::FinderCode | |
427 | name: ':TestFiles' | |
428 | version: '6.012' | |
429 | - | |
430 | class: Dist::Zilla::Plugin::FinderCode | |
431 | name: ':ExtraTestFiles' | |
432 | version: '6.012' | |
433 | - | |
434 | class: Dist::Zilla::Plugin::FinderCode | |
435 | name: ':ExecFiles' | |
436 | version: '6.012' | |
437 | - | |
438 | class: Dist::Zilla::Plugin::FinderCode | |
439 | name: ':PerlExecFiles' | |
440 | version: '6.012' | |
441 | - | |
442 | class: Dist::Zilla::Plugin::FinderCode | |
443 | name: ':ShareFiles' | |
444 | version: '6.012' | |
445 | - | |
446 | class: Dist::Zilla::Plugin::FinderCode | |
447 | name: ':MainModule' | |
448 | version: '6.012' | |
449 | - | |
450 | class: Dist::Zilla::Plugin::FinderCode | |
451 | name: ':AllFiles' | |
452 | version: '6.012' | |
453 | - | |
454 | class: Dist::Zilla::Plugin::FinderCode | |
455 | name: ':NoFiles' | |
456 | version: '6.012' | |
457 | - | |
458 | class: Dist::Zilla::Plugin::FinderCode | |
459 | name: MetaProvides::Package/AUTOVIV/:InstallModulesPM | |
460 | version: '6.012' | |
461 | zilla: | |
462 | class: Dist::Zilla::Dist::Builder | |
463 | config: | |
464 | is_trial: '0' | |
465 | version: '6.012' | |
466 | x_generated_by_perl: v5.30.1 | |
467 | x_serialization_backend: 'YAML::Tiny version 1.73' | |
25 | x_serialization_backend: 'CPAN::Meta::YAML version 0.018' |
0 | This archive contains the distribution B-COW, | |
1 | version 0.004: | |
2 | ||
3 | B::COW additional B helpers to check COW status | |
4 | ||
5 | This software is copyright (c) 2018 by Nicolas R. | |
6 | ||
7 | This is free software; you can redistribute it and/or modify it under | |
8 | the same terms as the Perl 5 programming language system itself. | |
9 | ||
10 | ||
11 | This README file was generated by Dist::Zilla::Plugin::Readme v6.012. |
0 | # NAME | |
1 | ||
2 | B::COW - B::COW additional B helpers to check COW status | |
3 | ||
4 | # VERSION | |
5 | ||
6 | version 0.004 | |
7 | ||
8 | # SYNOPSIS | |
9 | ||
10 | ```perl | |
11 | #!perl | |
12 | ||
13 | use strict; | |
14 | use warnings; | |
15 | ||
16 | use Test::More; # just used for illustration purpose | |
17 | ||
18 | use B::COW qw{:all}; | |
19 | ||
20 | if ( can_cow() ) { # $] >= 5.020 | |
21 | ok !is_cow(undef); | |
22 | ||
23 | my $str = "abcdef"; | |
24 | ok is_cow($str); | |
25 | is cowrefcnt($str), 1; | |
26 | ||
27 | my @a; | |
28 | push @a, $str for 1 .. 100; | |
29 | ||
30 | ok is_cow($str); | |
31 | ok is_cow( $a[0] ); | |
32 | ok is_cow( $a[99] ); | |
33 | is cowrefcnt($str), 101; | |
34 | is cowrefcnt( $a[-1] ), 101; | |
35 | ||
36 | delete $a[99]; | |
37 | is cowrefcnt($str), 100; | |
38 | is cowrefcnt( $a[-1] ), 100; | |
39 | ||
40 | { | |
41 | my %h = ( 'a' .. 'd' ); | |
42 | foreach my $k ( sort keys %h ) { | |
43 | ok is_cow($k); | |
44 | is cowrefcnt($k), 0; | |
45 | } | |
46 | } | |
47 | ||
48 | } | |
49 | else { | |
50 | my $str = "abcdef"; | |
51 | is is_cow($str), undef; | |
52 | is cowrefcnt($str), undef; | |
53 | is cowrefcnt_max(), undef; | |
54 | } | |
55 | ||
56 | done_testing; | |
57 | ``` | |
58 | ||
59 | # DESCRIPTION | |
60 | ||
61 | B::COW provides some naive additional B helpers to check the COW status of one SvPV. | |
62 | ||
63 | ## COW or Copy On Write introduction | |
64 | ||
65 | A COWed SvPV is sharing its string (the PV) with other SvPVs. | |
66 | It's a (kind of) Read Only C string, that would be Copied On Write (COW). | |
67 | ||
68 | More than one SV can share the same PV, but when one PV need to alter it, | |
69 | it would perform a copy of it, decrease the COWREFCNT counter. | |
70 | ||
71 | One SV can then drop the COW flag when it's the only one holding a pointer | |
72 | to the PV. | |
73 | ||
74 | The COWREFCNT is stored at the end of the PV, after the the "\\0". | |
75 | ||
76 | That value is limited to 255, when we reach 255, a new PV would be created, | |
77 | ||
78 | [![](https://github.com/atoomic/B-COW/workflows/linux/badge.svg)](https://github.com/atoomic/B-COW/actions) [![](https://github.com/atoomic/B-COW/workflows/macos/badge.svg)](https://github.com/atoomic/B-COW/actions) [![](https://github.com/atoomic/B-COW/workflows/windows/badge.svg)](https://github.com/atoomic/B-COW/actions) | |
79 | ||
80 | # FUNCTIONS | |
81 | ||
82 | ## can\_cow() | |
83 | ||
84 | Return a boolean value. True if your Perl version support Copy On Write for SvPVs | |
85 | ||
86 | ## is\_cow( PV ) | |
87 | ||
88 | Return a boolean value. True if the SV is cowed SvPV. (check the SV FLAGS) | |
89 | ||
90 | ## cowrefcnt( PV ) | |
91 | ||
92 | Return one integer representing the COW RefCount value. | |
93 | If the string is not COW, then it will return undef. | |
94 | ||
95 | ## cowrefcnt\_max() | |
96 | ||
97 | Will return the SV\_COW\_REFCNT\_MAX of your Perl. (if COW is supported, this should | |
98 | be 255 unless customized). | |
99 | ||
100 | # AUTHOR | |
101 | ||
102 | Nicolas R. <atoomic@cpan.org> | |
103 | ||
104 | # COPYRIGHT AND LICENSE | |
105 | ||
106 | This software is copyright (c) 2018 by Nicolas R. | |
107 | ||
108 | This is free software; you can redistribute it and/or modify it under | |
109 | the same terms as the Perl 5 programming language system itself. |
6 | 6 | |
7 | 7 | use base 'Exporter'; |
8 | 8 | |
9 | our $VERSION = '0.004'; # VERSION: generated by DZP::OurPkgVersion | |
9 | # VERSION: generated by DZP::OurPkgVersion | |
10 | 10 | |
11 | 11 | use XSLoader; |
12 | 12 | |
24 | 24 | |
25 | 25 | |
26 | 26 | 1; |
27 | ||
28 | __END__ | |
27 | __END__ | |
29 | 28 | |
30 | 29 | =pod |
31 | 30 | |
32 | 31 | =encoding utf-8 |
33 | 32 | |
34 | =head1 NAME | |
33 | =begin markdown | |
35 | 34 | |
36 | B::COW - B::COW additional B helpers to check COW status | |
35 | [![](https://github.com/atoomic/B-COW/workflows/linux/badge.svg)](https://github.com/atoomic/B-COW/actions) [![](https://github.com/atoomic/B-COW/workflows/macos/badge.svg)](https://github.com/atoomic/B-COW/actions) [![](https://github.com/atoomic/B-COW/workflows/windows/badge.svg)](https://github.com/atoomic/B-COW/actions) | |
37 | 36 | |
38 | =head1 VERSION | |
39 | ||
40 | version 0.004 | |
37 | =end markdown | |
41 | 38 | |
42 | 39 | =head1 SYNOPSIS |
43 | 40 | |
44 | #!perl | |
45 | ||
46 | use strict; | |
47 | use warnings; | |
48 | ||
49 | use Test::More; # just used for illustration purpose | |
50 | ||
51 | use B::COW qw{:all}; | |
52 | ||
53 | if ( can_cow() ) { # $] >= 5.020 | |
54 | ok !is_cow(undef); | |
55 | ||
56 | my $str = "abcdef"; | |
57 | ok is_cow($str); | |
58 | is cowrefcnt($str), 1; | |
59 | ||
60 | my @a; | |
61 | push @a, $str for 1 .. 100; | |
62 | ||
63 | ok is_cow($str); | |
64 | ok is_cow( $a[0] ); | |
65 | ok is_cow( $a[99] ); | |
66 | is cowrefcnt($str), 101; | |
67 | is cowrefcnt( $a[-1] ), 101; | |
68 | ||
69 | delete $a[99]; | |
70 | is cowrefcnt($str), 100; | |
71 | is cowrefcnt( $a[-1] ), 100; | |
72 | ||
73 | { | |
74 | my %h = ( 'a' .. 'd' ); | |
75 | foreach my $k ( sort keys %h ) { | |
76 | ok is_cow($k); | |
77 | is cowrefcnt($k), 0; | |
78 | } | |
79 | } | |
80 | ||
81 | } | |
82 | else { | |
83 | my $str = "abcdef"; | |
84 | is is_cow($str), undef; | |
85 | is cowrefcnt($str), undef; | |
86 | is cowrefcnt_max(), undef; | |
87 | } | |
88 | ||
89 | done_testing; | |
41 | # EXAMPLE: examples/synopsis.pl | |
90 | 42 | |
91 | 43 | =head1 DESCRIPTION |
92 | 44 | |
107 | 59 | |
108 | 60 | That value is limited to 255, when we reach 255, a new PV would be created, |
109 | 61 | |
110 | =for markdown [![](https://github.com/atoomic/B-COW/workflows/linux/badge.svg)](https://github.com/atoomic/B-COW/actions) [![](https://github.com/atoomic/B-COW/workflows/macos/badge.svg)](https://github.com/atoomic/B-COW/actions) [![](https://github.com/atoomic/B-COW/workflows/windows/badge.svg)](https://github.com/atoomic/B-COW/actions) | |
111 | ||
112 | 62 | =head1 FUNCTIONS |
113 | 63 | |
114 | 64 | =head2 can_cow() |
127 | 77 | =head2 cowrefcnt_max() |
128 | 78 | |
129 | 79 | Will return the SV_COW_REFCNT_MAX of your Perl. (if COW is supported, this should |
130 | be 255 unless customized). | |
131 | ||
132 | =head1 AUTHOR | |
133 | ||
134 | Nicolas R. <atoomic@cpan.org> | |
135 | ||
136 | =head1 COPYRIGHT AND LICENSE | |
137 | ||
138 | This software is copyright (c) 2018 by Nicolas R. | |
139 | ||
140 | This is free software; you can redistribute it and/or modify it under | |
141 | the same terms as the Perl 5 programming language system itself. | |
142 | ||
143 | =cut | |
80 | be 255 unless customized).⏎ |
0 | do { my $x = { | |
1 | 'configure' => { | |
2 | 'requires' => { | |
3 | 'ExtUtils::MakeMaker' => '0' | |
4 | } | |
5 | }, | |
6 | 'develop' => { | |
7 | 'requires' => { | |
8 | 'File::Spec' => '0', | |
9 | 'IO::Handle' => '0', | |
10 | 'IPC::Open3' => '0', | |
11 | 'Test::CPAN::Meta' => '0', | |
12 | 'Test::MinimumVersion' => '0', | |
13 | 'Test::More' => '0.88', | |
14 | 'Test::NoTabs' => '0', | |
15 | 'Test::Pod' => '1.41', | |
16 | 'Test::Synopsis' => '0' | |
17 | } | |
18 | }, | |
19 | 'runtime' => { | |
20 | 'requires' => { | |
21 | 'perl' => '5.008' | |
22 | } | |
23 | }, | |
24 | 'test' => { | |
25 | 'recommends' => { | |
26 | 'CPAN::Meta' => '2.120900' | |
27 | }, | |
28 | 'requires' => { | |
29 | 'Devel::Peek' => '0', | |
30 | 'ExtUtils::MakeMaker' => '0', | |
31 | 'File::Spec' => '0', | |
32 | 'Test::More' => '0' | |
33 | } | |
34 | } | |
35 | }; | |
36 | $x; | |
37 | }⏎ |
0 | #!perl | |
1 | ||
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 | |
6 | ||
7 | use Test::More tests => 1; | |
8 | ||
9 | use ExtUtils::MakeMaker; | |
10 | use File::Spec; | |
11 | ||
12 | # from $version::LAX | |
13 | my $lax_version_re = | |
14 | qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | |
15 | | | |
16 | (?:\.[0-9]+) (?:_[0-9]+)? | |
17 | ) | (?: | |
18 | v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | |
19 | | | |
20 | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? | |
21 | ) | |
22 | )/x; | |
23 | ||
24 | # hide optional CPAN::Meta modules from prereq scanner | |
25 | # and check if they are available | |
26 | my $cpan_meta = "CPAN::Meta"; | |
27 | my $cpan_meta_pre = "CPAN::Meta::Prereqs"; | |
28 | my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic | |
29 | ||
30 | # Verify requirements? | |
31 | my $DO_VERIFY_PREREQS = 1; | |
32 | ||
33 | sub _max { | |
34 | my $max = shift; | |
35 | $max = ( $_ > $max ) ? $_ : $max for @_; | |
36 | return $max; | |
37 | } | |
38 | ||
39 | sub _merge_prereqs { | |
40 | my ($collector, $prereqs) = @_; | |
41 | ||
42 | # CPAN::Meta::Prereqs object | |
43 | if (ref $collector eq $cpan_meta_pre) { | |
44 | return $collector->with_merged_prereqs( | |
45 | CPAN::Meta::Prereqs->new( $prereqs ) | |
46 | ); | |
47 | } | |
48 | ||
49 | # Raw hashrefs | |
50 | for my $phase ( keys %$prereqs ) { | |
51 | for my $type ( keys %{ $prereqs->{$phase} } ) { | |
52 | for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { | |
53 | $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; | |
54 | } | |
55 | } | |
56 | } | |
57 | ||
58 | return $collector; | |
59 | } | |
60 | ||
61 | my @include = qw( | |
62 | ||
63 | ); | |
64 | ||
65 | my @exclude = qw( | |
66 | ||
67 | ); | |
68 | ||
69 | # Add static prereqs to the included modules list | |
70 | my $static_prereqs = do './t/00-report-prereqs.dd'; | |
71 | ||
72 | # Merge all prereqs (either with ::Prereqs or a hashref) | |
73 | my $full_prereqs = _merge_prereqs( | |
74 | ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), | |
75 | $static_prereqs | |
76 | ); | |
77 | ||
78 | # Add dynamic prereqs to the included modules list (if we can) | |
79 | my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; | |
80 | my $cpan_meta_error; | |
81 | if ( $source && $HAS_CPAN_META | |
82 | && (my $meta = eval { CPAN::Meta->load_file($source) } ) | |
83 | ) { | |
84 | $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); | |
85 | } | |
86 | else { | |
87 | $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) | |
88 | $source = 'static metadata'; | |
89 | } | |
90 | ||
91 | my @full_reports; | |
92 | my @dep_errors; | |
93 | my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; | |
94 | ||
95 | # Add static includes into a fake section | |
96 | for my $mod (@include) { | |
97 | $req_hash->{other}{modules}{$mod} = 0; | |
98 | } | |
99 | ||
100 | for my $phase ( qw(configure build test runtime develop other) ) { | |
101 | next unless $req_hash->{$phase}; | |
102 | next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); | |
103 | ||
104 | for my $type ( qw(requires recommends suggests conflicts modules) ) { | |
105 | next unless $req_hash->{$phase}{$type}; | |
106 | ||
107 | my $title = ucfirst($phase).' '.ucfirst($type); | |
108 | my @reports = [qw/Module Want Have/]; | |
109 | ||
110 | for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { | |
111 | next if $mod eq 'perl'; | |
112 | next if grep { $_ eq $mod } @exclude; | |
113 | ||
114 | my $file = $mod; | |
115 | $file =~ s{::}{/}g; | |
116 | $file .= ".pm"; | |
117 | my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; | |
118 | ||
119 | my $want = $req_hash->{$phase}{$type}{$mod}; | |
120 | $want = "undef" unless defined $want; | |
121 | $want = "any" if !$want && $want == 0; | |
122 | ||
123 | my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; | |
124 | ||
125 | if ($prefix) { | |
126 | my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); | |
127 | $have = "undef" unless defined $have; | |
128 | push @reports, [$mod, $want, $have]; | |
129 | ||
130 | if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { | |
131 | if ( $have !~ /\A$lax_version_re\z/ ) { | |
132 | push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; | |
133 | } | |
134 | elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { | |
135 | push @dep_errors, "$mod version '$have' is not in required range '$want'"; | |
136 | } | |
137 | } | |
138 | } | |
139 | else { | |
140 | push @reports, [$mod, $want, "missing"]; | |
141 | ||
142 | if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { | |
143 | push @dep_errors, "$mod is not installed ($req_string)"; | |
144 | } | |
145 | } | |
146 | } | |
147 | ||
148 | if ( @reports ) { | |
149 | push @full_reports, "=== $title ===\n\n"; | |
150 | ||
151 | my $ml = _max( map { length $_->[0] } @reports ); | |
152 | my $wl = _max( map { length $_->[1] } @reports ); | |
153 | my $hl = _max( map { length $_->[2] } @reports ); | |
154 | ||
155 | if ($type eq 'modules') { | |
156 | splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; | |
157 | push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; | |
158 | } | |
159 | else { | |
160 | splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; | |
161 | push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; | |
162 | } | |
163 | ||
164 | push @full_reports, "\n"; | |
165 | } | |
166 | } | |
167 | } | |
168 | ||
169 | if ( @full_reports ) { | |
170 | diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; | |
171 | } | |
172 | ||
173 | if ( $cpan_meta_error || @dep_errors ) { | |
174 | diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; | |
175 | } | |
176 | ||
177 | if ( $cpan_meta_error ) { | |
178 | my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; | |
179 | diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; | |
180 | } | |
181 | ||
182 | if ( @dep_errors ) { | |
183 | diag join("\n", | |
184 | "\nThe following REQUIRED prerequisites were not satisfied:\n", | |
185 | @dep_errors, | |
186 | "\n" | |
187 | ); | |
188 | } | |
189 | ||
190 | pass; | |
191 | ||
192 | # vim: ts=4 sts=4 sw=4 et: |
0 | use 5.006; | |
1 | use strict; | |
2 | use warnings; | |
3 | ||
4 | # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 | |
5 | ||
6 | use Test::More; | |
7 | ||
8 | plan tests => 2; | |
9 | ||
10 | my @module_files = ( | |
11 | 'B/COW.pm' | |
12 | ); | |
13 | ||
14 | ||
15 | ||
16 | # no fake home requested | |
17 | ||
18 | my @switches = ( | |
19 | -d 'blib' ? '-Mblib' : '-Ilib', | |
20 | ); | |
21 | ||
22 | use File::Spec; | |
23 | use IPC::Open3; | |
24 | use IO::Handle; | |
25 | ||
26 | open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; | |
27 | ||
28 | my @warnings; | |
29 | for my $lib (@module_files) | |
30 | { | |
31 | # see L<perlfaq8/How can I capture STDERR from an external command?> | |
32 | my $stderr = IO::Handle->new; | |
33 | ||
34 | diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } | |
35 | $^X, @switches, '-e', "require q[$lib]")) | |
36 | if $ENV{PERL_COMPILE_TEST_DEBUG}; | |
37 | ||
38 | my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); | |
39 | binmode $stderr, ':crlf' if $^O eq 'MSWin32'; | |
40 | my @_warnings = <$stderr>; | |
41 | waitpid($pid, 0); | |
42 | is($?, 0, "$lib loaded ok"); | |
43 | ||
44 | shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ | |
45 | and not eval { +require blib; blib->VERSION('1.01') }; | |
46 | ||
47 | if (@_warnings) | |
48 | { | |
49 | warn @_warnings; | |
50 | push @warnings, @_warnings; | |
51 | } | |
52 | } | |
53 | ||
54 | ||
55 | ||
56 | is(scalar(@warnings), 0, 'no warnings found') | |
57 | or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ); | |
58 | ||
59 |
0 | use strict; | |
1 | use warnings; | |
2 | ||
3 | use Test::More; | |
4 | use Test::MinimumVersion; | |
5 | all_minimum_version_ok( qq{5.008} ); |
0 | use strict; | |
1 | use warnings; | |
2 | ||
3 | # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 | |
4 | ||
5 | use Test::More 0.88; | |
6 | use Test::NoTabs; | |
7 | ||
8 | my @files = ( | |
9 | 'lib/B/COW.pm', | |
10 | 't/00-load.t', | |
11 | 't/00-report-prereqs.dd', | |
12 | 't/00-report-prereqs.t', | |
13 | 't/01-basic.t' | |
14 | ); | |
15 | ||
16 | notabs_ok($_) foreach @files; | |
17 | done_testing; |