Dist-Zilla-Plugin-ModuleBuildTiny-0.020000755001750001750 015005171266 17422 5ustar00leontleont000000000000README100644001750001750 62415005171266 20345 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020This archive contains the distribution Dist-Zilla-Plugin-ModuleBuildTiny, version 0.020: Build a Build.PL that uses Module::Build::Tiny This software is copyright (c) 2011 by Leon Timmermans. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v6.030. Changes100644001750001750 534215005171266 21002 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020Revision history for Dist-Zilla-Plugin-ModuleBuildTiny 0.020 2025-05-02 18:28:36+02:00 Europe/Berlin - Postpone experimental usage to prevent warnings on older perls 0.019 2025-04-08 21:43:40+02:00 Europe/Brussels - Allow module sharedirs - Allow dynamic_config=1 0.018 2025-04-06 23:28:49+02:00 Europe/Brussels - Add a auto_configure_requires option - Use perl v5.20 syntax 0.017 2023-05-08 18:42:37+02:00 Europe/Amsterdam - Include extra newline in Build.PL to facilitate other plugins 0.016 2023-04-28 15:51:16+02:00 Europe/Brussels - Add header and footer attributes - Add configure dependency on MBT version 0.044 if include/ or src/ 0.015 2016-06-09 19:28:18+02:00 Europe/Amsterdam Adapted to dzil v6 0.014 2015-08-22 19:23:20+02:00 Europe/Amsterdam Increase minimum MBT in conservative logic 0.013 2015-07-23 11:58:57+02:00 Europe/Amsterdam Restored installability on 5.10 Added documentation for static install 0.012 2015-07-16 17:00:08+02:00 Europe/Amsterdam Also look for .xs, .PL files in files gathered in memory 0.011 2015-06-30 17:54:00+02:00 Europe/Amsterdam Switch default to conservative version logic Add static install option 0.010 2015-03-27 14:36:24+01:00 Europe/Amsterdam Bump a prereq to avoid meta validation issues 0.009 2015-02-18 21:19:51+01:00 Europe/Amsterdam Implement a conservative minimum mbt heuristic Detect minimum perl version from configure, build, test and runtime phases instead of just runtime 0.008 2014-10-30 16:05:29+01:00 Europe/Amsterdam Build.PL is now created at the correct phase (gather_files), with final content determined at the normal time (setup_installer) 0.007 2014-09-01 11:25:41+02:00 Europe/Amsterdam use strict, warnings in generated Build.PL 0.006 2014-01-13 00:54:54CET+0100 Europe/Amsterdam Prohibit the use of a sharedir configuration that is not supported Add basic testing 0.005 2013-09-08 21:41:33 Europe/Amsterdam Prohibit dynamic_config Depend on author-installed Module::Build::Tiny version 0.004 2013-03-20 15:00:32 Europe/Amsterdam Add «use $minimum_perl;» statement to Build.PL and minimum_perl attribute to plugin 0.003 2013-03-04 14:10:35 Europe/Amsterdam Require the author's version of Module::Build::Tiny by default. 0.002 2011-05-02 09:18:37 Europe/Bucharest Increase default minimal version of Module::Build::Tiny to 0.007 to avoid configure time issues 0.001 2011-04-29 16:38:02 Europe/Bucharest Initial release LICENSE100644001750001750 4366115005171266 20542 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020This software is copyright (c) 2011 by Leon Timmermans. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2011 by Leon Timmermans. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2011 by Leon Timmermans. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End INSTALL100644001750001750 506515005171266 20542 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020This is the Perl distribution Dist-Zilla-Plugin-ModuleBuildTiny. Installing Dist-Zilla-Plugin-ModuleBuildTiny is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Dist::Zilla::Plugin::ModuleBuildTiny If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Dist::Zilla::Plugin::ModuleBuildTiny ## Manual installation As a last resort, you can manually install it. If you have not already downloaded the release tarball, you can find the download link on the module's MetaCPAN page: https://metacpan.org/pod/Dist::Zilla::Plugin::ModuleBuildTiny Untar the tarball, install configure prerequisites (see below), then build it: % perl Build.PL % ./Build && ./Build test Then install it: % ./Build install Or the more portable variation: % perl Build.PL % perl Build % perl Build test % perl Build install If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib The prerequisites of this distribution will also have to be installed manually. The prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated by running the manual build process described above. ## Configure Prerequisites This distribution requires other modules to be installed before this distribution's installer can be run. They can be found under the "configure_requires" key of META.yml or the "{prereqs}{configure}{requires}" key of META.json. ## Other Prerequisites This distribution may require additional modules to be installed after running Build.PL. Look for prerequisites in the following phases: * to run ./Build, PHASE = build * to use the module code itself, PHASE = runtime * to run tests, PHASE = test They can all be found in the "PHASE_requires" key of MYMETA.yml or the "{prereqs}{PHASE}{requires}" key of MYMETA.json. ## Documentation Dist-Zilla-Plugin-ModuleBuildTiny documentation is available as POD. You can run `perldoc` from a shell to read the documentation: % perldoc Dist::Zilla::Plugin::ModuleBuildTiny For more information on installing Perl modules via CPAN, please see: https://www.cpan.org/modules/INSTALL.html dist.ini100644001750001750 125615005171266 21153 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020name = Dist-Zilla-Plugin-ModuleBuildTiny author = Leon Timmermans license = Perl_5 copyright_holder = Leon Timmermans copyright_year = 2011 ;Building [Bootstrap::lib] [Git::GatherDir] [PruneCruft] [MetaYAML] [License] [Manifest] [Readme] [AutoPrereqs] [MetaJSON] [GitHub::Meta] [Git::NextVersion] [MetaProvides::Package] [ModuleBuildTiny] static = auto [Test::Compile] [PodSyntaxTests] ; [PodCoverageTests] [InstallGuide] [PodWeaver] [PkgVersion] [NextRelease] [CheckChangesHasContent] [Git::Check] [RunExtraTests] [TestRelease] [ConfirmRelease] [MinimumPerl] [UploadToCPAN] [Git::Commit] [Git::Tag] [Git::Push] [Prereqs] Module::Build::Tiny = 0.039 META.yml100644001750001750 306615005171266 20761 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020--- abstract: 'Build a Build.PL that uses Module::Build::Tiny' author: - 'Leon Timmermans ' build_requires: CPAN::Meta: '0' File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Path::Tiny: '0' Test::DZil: '0' Test::Deep: '0' Test::Fatal: '0' Test::More: '0' perl: '5.020' strict: '0' warnings: '0' configure_requires: Module::Build::Tiny: '0.034' perl: '5.020' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Dist-Zilla-Plugin-ModuleBuildTiny provides: Dist::Zilla::Plugin::ModuleBuildTiny: file: lib/Dist/Zilla/Plugin/ModuleBuildTiny.pm version: '0.020' requires: Dist::Zilla: '4.300039' Dist::Zilla::File::InMemory: '0' Dist::Zilla::Role::BuildPL: '0' Dist::Zilla::Role::FileGatherer: '0' Dist::Zilla::Role::MetaProvider: '0' Dist::Zilla::Role::PrereqSource: '0' Dist::Zilla::Role::TextTemplate: '0' List::Util: '1.33' Module::Build::Tiny: '0.039' Module::Metadata: '0' Moose: '0' Moose::Util::TypeConstraints: '0' MooseX::Types::Moose: '0' MooseX::Types::Perl: '0' experimental: '0' perl: '5.020' resources: bugtracker: https://github.com/Leont/dist-zilla-plugin-modulebuildtiny/issues repository: git://github.com/Leont/dist-zilla-plugin-modulebuildtiny.git version: '0.020' x_generated_by_perl: v5.36.1 x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' x_static_install: 1 MANIFEST100644001750001750 44715005171266 20621 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030. Build.PL Changes INSTALL LICENSE MANIFEST META.json META.yml README dist.ini lib/Dist/Zilla/Plugin/ModuleBuildTiny.pm t/00-compile.t t/basic.t t/perl-prereq.t t/sharedir.t t/static_install.t xt/author/pod-syntax.t Build.PL100644001750001750 30715005171266 20757 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020# This Build.PL for Dist-Zilla-Plugin-ModuleBuildTiny was generated by Dist::Zilla::Plugin::ModuleBuildTiny . use strict; use warnings; use 5.020; use Module::Build::Tiny 0.034; Build_PL(); t000755001750001750 015005171266 17606 5ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020basic.t100644001750001750 213615005171266 21216 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/t#! perl use strict; use warnings FATAL => 'all'; use CPAN::Meta; use Path::Tiny; use Test::More; use Test::DZil; use Module::Metadata; my $tzil = Builder->from_config( { dist_root => 't/does_not_exist' }, { add_files => { 'source/dist.ini' => simple_ini( [ ModuleBuildTiny => { minimum_perl => $], } ], 'MetaJSON', ), }, }, ); $tzil->build; my $VERSION = Dist::Zilla::Plugin::ModuleBuildTiny->VERSION || ''; my $expected = <<"END"; # This Build.PL for DZT-Sample was generated by Dist::Zilla::Plugin::ModuleBuildTiny $VERSION. use strict; use warnings; use $]; use Module::Build::Tiny 0.034; Build_PL(); END my $base = path($tzil->built_in); is($base->child('Build.PL')->slurp, $expected, 'Build.PL is exactly like expected'); my $meta = CPAN::Meta->load_file($base->child('META.json'), { lazy_validation => 0 }); my $configure_requires = $meta->effective_prereqs->requirements_for('configure', 'requires')->as_string_hash; is_deeply($configure_requires, { 'Module::Build::Tiny' => '0.034' }, 'configure requires' ); done_testing; # vim: set ts=4 sw=4 noet nolist : META.json100644001750001750 531615005171266 21131 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020{ "abstract" : "Build a Build.PL that uses Module::Build::Tiny", "author" : [ "Leon Timmermans " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Dist-Zilla-Plugin-ModuleBuildTiny", "prereqs" : { "configure" : { "requires" : { "Module::Build::Tiny" : "0.034", "perl" : "5.020" } }, "develop" : { "requires" : { "Test::More" : "0", "Test::Pod" : "1.41", "strict" : "0", "warnings" : "0" } }, "runtime" : { "requires" : { "Dist::Zilla" : "4.300039", "Dist::Zilla::File::InMemory" : "0", "Dist::Zilla::Role::BuildPL" : "0", "Dist::Zilla::Role::FileGatherer" : "0", "Dist::Zilla::Role::MetaProvider" : "0", "Dist::Zilla::Role::PrereqSource" : "0", "Dist::Zilla::Role::TextTemplate" : "0", "List::Util" : "1.33", "Module::Build::Tiny" : "0.039", "Module::Metadata" : "0", "Moose" : "0", "Moose::Util::TypeConstraints" : "0", "MooseX::Types::Moose" : "0", "MooseX::Types::Perl" : "0", "experimental" : "0", "perl" : "5.020" } }, "test" : { "requires" : { "CPAN::Meta" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Path::Tiny" : "0", "Test::DZil" : "0", "Test::Deep" : "0", "Test::Fatal" : "0", "Test::More" : "0", "perl" : "5.020", "strict" : "0", "warnings" : "0" } } }, "provides" : { "Dist::Zilla::Plugin::ModuleBuildTiny" : { "file" : "lib/Dist/Zilla/Plugin/ModuleBuildTiny.pm", "version" : "0.020" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/Leont/dist-zilla-plugin-modulebuildtiny/issues" }, "repository" : { "type" : "git", "url" : "git://github.com/Leont/dist-zilla-plugin-modulebuildtiny.git", "web" : "https://github.com/Leont/dist-zilla-plugin-modulebuildtiny" } }, "version" : "0.020", "x_generated_by_perl" : "v5.36.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.36", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later", "x_static_install" : 1 } sharedir.t100644001750001750 213415005171266 21734 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/tuse strict; use warnings FATAL => 'all'; use Test::More; use Test::Fatal; use Test::DZil; { my $tzil = Builder->from_config( { dist_root => 't/does_not_exist' }, { add_files => { 'source/dist.ini' => simple_ini( 'GatherDir', [ 'ModuleShareDirs' => { 'Foo' => 'share/foo' } ], 'ModuleBuildTiny', ), 'source/share/foo' => 'some extra file', }, }, ); like( exception { $tzil->build }, qr/\[ModuleBuildTiny\] Sharedir location for module Foo sharedir should be 'module-share\/Foo'/, 'warning issued when there is a module sharedir in use', ); } { my $tzil = Builder->from_config( { dist_root => 't/does_not_exist' }, { add_files => { 'source/dist.ini' => simple_ini( 'GatherDir', [ 'ShareDir' => { dir => 'another_share_dir' } ], 'ModuleBuildTiny', ), 'source/another_share_dir/foo' => 'some extra file', }, }, ); like( exception { $tzil->build }, qr{\[ModuleBuildTiny\] Sharedir location must be share/}, 'warning issued when the dist sharedir is not share/', ); } done_testing; # vim: set ts=4 sw=4 noet nolist : 00-compile.t100644001750001750 266215005171266 22006 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/tuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Dist/Zilla/Plugin/ModuleBuildTiny.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; perl-prereq.t100644001750001750 157515005171266 22401 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/t#! perl use strict; use warnings FATAL => 'all'; use CPAN::Meta; use Path::Tiny; use Test::More; use Test::DZil; use Module::Metadata; my $tzil = Builder->from_config( { dist_root => 't/does_not_exist' }, { add_files => { 'source/dist.ini' => simple_ini( [ ModuleBuildTiny => ], [ Prereqs => 'RuntimeRequires' => { perl => '5.008' } ], [ Prereqs => 'BuildRequires' => { perl => '5.010' } ], ), }, }, ); $tzil->build; my $VERSION = Dist::Zilla::Plugin::ModuleBuildTiny->VERSION || ''; my $expected = <<"END"; # This Build.PL for DZT-Sample was generated by Dist::Zilla::Plugin::ModuleBuildTiny $VERSION. use strict; use warnings; use 5.010; use Module::Build::Tiny 0.034; Build_PL(); END is(path($tzil->built_in)->child('Build.PL')->slurp, $expected, 'Build.PL declares the correct minimum perl version'); done_testing; # vim: set ts=4 sw=4 noet nolist : static_install.t100644001750001750 224515005171266 23153 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/tuse strict; use warnings; use Test::More; use Test::DZil; use Test::Deep; use Path::Tiny; my @tests = ( { test_name => '.PL file present', zilla_files => [ path(qw(source lib Foo.PL)) => qq{#!/usr/bin/perl\nexit 0;\n}, ], x_static_install => 0, }, { test_name => '.xs file present', zilla_files => [ path(qw(source lib Foo.xs)) => qq{#include "perl.h"\n}, ], x_static_install => 0, }, { test_name => 'static install', x_static_install => 1, }, ); subtest $_->{test_name} => sub { my $config = $_; my $tzil = Builder->from_config( { dist_root => 't/does_not_exist' }, { add_files => { 'source/dist.ini' => simple_ini( [ ModuleBuildTiny => { static => 'auto', } ], 'MetaJSON', ), path(qw(source lib Foo.pm)) => "package Foo;\n1;\n", @{ $config->{zilla_files} || [] }, }, }, ); $tzil->build; cmp_deeply( $tzil->distmeta, superhashof({ x_static_install => 1, }), "metadata contains auto-computed value for x_static_install($config->{x_static_install})", ) or diag 'got distmeta: ', explain $tzil->distmeta; } foreach @tests; done_testing; # vim: set sts=4 ts=4 sw=4 noet nolist : author000755001750001750 015005171266 21300 5ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/xtpod-syntax.t100644001750001750 25215005171266 23712 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Plugin000755001750001750 015005171266 23325 5ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/lib/Dist/ZillaModuleBuildTiny.pm100644001750001750 2164115005171266 27120 0ustar00leontleont000000000000Dist-Zilla-Plugin-ModuleBuildTiny-0.020/lib/Dist/Zilla/Pluginpackage Dist::Zilla::Plugin::ModuleBuildTiny; $Dist::Zilla::Plugin::ModuleBuildTiny::VERSION = '0.020'; use 5.020; use Moose; with qw/ Dist::Zilla::Role::BuildPL Dist::Zilla::Role::TextTemplate Dist::Zilla::Role::PrereqSource Dist::Zilla::Role::FileGatherer Dist::Zilla::Role::MetaProvider /; use Dist::Zilla 4.300039; use Module::Metadata; use Moose::Util::TypeConstraints 'enum'; use MooseX::Types::Perl qw/StrictVersionStr/; use MooseX::Types::Moose qw/Bool Str ArrayRef/; use List::Util 1.33 qw/first any/; use experimental qw/signatures postderef/; sub mvp_multivalue_args { qw(header_strs footer_strs) } sub mvp_aliases { +{ header => 'header_strs', footer => 'footer_strs', } } around BUILDARGS => sub($orig, $class, @args) { my $args = $class->$orig(@args); my $delimiter = delete $args->{delimiter}; if (defined $delimiter and length($delimiter)) { foreach my $arg (grep exists $args->{$_}, qw(header_strs footer_strs)) { s/^\Q$delimiter\E// foreach $args->{$arg}->@*; } } return $args; }; has version_method => ( is => 'ro', isa => enum(['installed', 'conservative']), default => 'conservative', ); has has_pl => ( is => 'ro', isa => Bool, lazy => 1, default => sub($self) { return any { $_->name =~ /^lib\/.*\.PL$/ } $self->zilla->files->@*; }, ); has has_xs => ( is => 'ro', isa => Bool, lazy => 1, default => sub($self) { return any { $_->name =~ /^lib\/.*\.xs$/ } $self->zilla->files->@*; }, ); has static => ( is => 'ro', isa => enum([qw/no yes auto/]), default => 'no', ); has version => ( is => 'ro', lazy => 1, isa => StrictVersionStr, default => sub($self) { if ($self->version_method eq 'installed') { return Module::Metadata->new_from_module('Module::Build::Tiny')->version->stringify; } elsif (-e 'include/' or any { $_->name =~ /^src\/.*\.c$/} $self->zilla->files->@*) { return '0.044'; } elsif (-e 'module-share') { return '0.044'; } elsif ($self->has_pl) { return '0.039'; } elsif ($self->has_xs) { return '0.036'; } return '0.034'; # _build_params format }, ); has minimum_perl => ( is => 'ro', isa => StrictVersionStr, lazy => 1, default => sub($self) { my $prereqs = $self->zilla->prereqs->cpan_meta_prereqs; my $reqs = $prereqs->merged_requirements([ qw/configure build test runtime/ ], ['requires']); return $reqs->requirements_for_module('perl') || '5.006'; }, ); has header_strs => ( is => 'ro', isa => ArrayRef[Str], traits => ['Array'], lazy => 1, default => sub { [] }, documentation => "Additional code lines to include at the beginning of Makefile.PL", ); has header_file => ( is => 'ro', isa => Str, documentation => 'Additional header content to include from a file', ); has header => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_header', documentation => "A string included at the beginning of Makefile.PL", ); sub _build_header($self) { join "\n", $self->header_strs->@*, ( $self->header_file ? do { my $abs_file = path($self->zilla->root, $self->header_file); $self->log_fatal([ 'header_file %s does not exist!', $self->header_file ]) if not $abs_file->exists; $abs_file->slurp_utf8 } : () ); } has footer_strs => ( is => 'ro', isa => ArrayRef[Str], traits => ['Array'], lazy => 1, default => sub { [] }, documentation => "Additional code lines to include at the end of Makefile.PL", ); has footer_file => ( is => 'ro', isa => Str, documentation => 'Additional footer content to include from a file', ); has footer => ( is => 'ro', isa => Str, lazy => 1, builder => '_build_footer', documentation => "A string included at the end of Makefile.PL", ); sub _build_footer($self) { join "\n", $self->footer_strs->@*, ( $self->footer_file ? do { my $abs_file = path($self->zilla->root, $self->footer_file); $self->log_fatal([ 'footer_file %s does not exist!', $self->footer_file ]) if not $abs_file->exists; $abs_file->slurp_utf8 } : () ); } has auto_configure_requires => ( is => 'ro', isa => Bool, default => 1, ); my $template = <<'BUILD_PL'; # This Build.PL for {{ $dist_name }} was generated by {{ $plugin_title }}. use strict; use warnings; {{ $header }} use {{ $minimum_perl }}; use Module::Build::Tiny{{ $version ne 0 && " $version" }}; Build_PL(); {{ $footer }} BUILD_PL sub register_prereqs($self) { if ($self->auto_configure_requires) { $self->zilla->register_prereqs({ phase => 'configure' }, 'Module::Build::Tiny' => $self->version); } return; } sub can_static($self) { return !$self->has_pl && !$self->has_xs; } sub metadata($self) { my $static = $self->static eq 'yes' || $self->static eq 'auto' && $self->can_static; return $static ? { x_static_install => 1 } : (); } sub gather_files($self) { if (my $file = first { $_->name eq 'Build.PL' } $self->zilla->files->@*) { # if it's another type, some other plugin added it, so it's better to # error out and let the developer sort out what went wrong. if ($file->isa('Dist::Zilla::File::OnDisk')) { $self->log('replacing existing Build.PL found in repository'); $self->zilla->prune_file($file); } } require Dist::Zilla::File::InMemory; my $file = Dist::Zilla::File::InMemory->new({ name => 'Build.PL', content => $template, # template evaluated later }); $self->add_file($file); return; } sub setup_installer($self) { for my $map (map { $_->share_dir_map } $self->zilla->plugins_with(-ShareDir)->@*) { for my $module (keys $map->{module}->%*) { my $expected = "module-share/$module" =~ s/::/-/gr; if ($map->{module}{$module} ne $expected) { $self->log_fatal("Sharedir location for module $module sharedir should be '$expected'"); } } $self->log_fatal('Sharedir location must be share/') if defined $map->{dist} and $map->{dist} ne 'share'; } my $file = first { $_->name eq 'Build.PL' } @{$self->zilla->files}; my $content = $file->content; $content = $self->fill_in_string($content, { version => $self->version, minimum_perl => $self->minimum_perl, dist_name => $self->zilla->name, plugin_title => ref($self) . ' ' . ($self->VERSION || ''), header => $self->header, footer => $self->footer, }); $self->log_debug([ 'updating contents of Build.PL in memory' ]); $file->content($content); return; } __PACKAGE__->meta->make_immutable; no Moose::Util::TypeConstraints; no Moose; 1; # ABSTRACT: Build a Build.PL that uses Module::Build::Tiny # vim: set ts=4 sw=4 noet nolist : __END__ =pod =encoding UTF-8 =head1 NAME Dist::Zilla::Plugin::ModuleBuildTiny - Build a Build.PL that uses Module::Build::Tiny =head1 VERSION version 0.020 =head1 DESCRIPTION This plugin will create a F for installing the dist using L. =head1 ATTRIBUTES =head2 version B Specify the minimum version of L to depend on. Defaults to the version determined by C. =head2 version_method This attribute determines how the default minimum perl is detected. It has two possible values: =over 4 =item * installed This will give the version installed on the author's perl installation. =item * conservative This will return a heuristically determined minimum version of MBT. =back =head2 minimum_perl B Specify the minimum version of perl to require in the F. This is normally taken from dzil's prereq metadata. =head2 static This is an option to set the B C metadata field. B if you are not involved in its testing with the Perl Toolchain Gang. It has three possible values: =over 4 =item * no No extra metadata is added. This is the default setting. =item * yes Sets C in metadata. =item * auto Sets C in metadata if the distribution appears to be compatible - presently only the existence of F<.PL> and F<.xs> files are checked. =back =head2 header A line of code which is included near the top of F. Can be used more than once. =head2 footer A line of code which is included at the bottom of F. Can be used more than once. =head2 delimiter A string, usually a single character, which is stripped from the beginning of all C
, and C