Dist-Zilla-Plugin-RequiresExternal-1.006000755000765000024 012637665701 17306 5ustar00mjgstaff000000000000README100644000765000024 1030312637665701 20264 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006NAME Dist::Zilla::Plugin::RequiresExternal - make dists require external commands VERSION version 1.006 SYNOPSIS In your dist.ini: [RequiresExternal] requires = /path/to/some/executable requires = executable_in_path DESCRIPTION This Dist::Zilla plugin creates a test in your distribution to check for the existence of executable commands you require. ATTRIBUTES requires Each requires attribute should be either an absolute path to an executable or the name of a command in the user's PATH environment. Multiple requires lines are allowed. Example from a dist.ini file: [RequiresExternal] requires = sqlplus requires = /usr/bin/java This will require the program sqlplus to be available somewhere in the user's PATH and the program java specifically in /usr/bin. fatal Boolean value to determine if a failed test will immediately stop testing. It also causes the test name to change to t/000-requires_external.t so that it runs earlier. Defaults to false. METHODS gather_files Adds a t/requires_external.t test script to your distribution that checks if each "requires" item is executable. metadata Using this plugin will add Test::Most and Env::Path to your distribution's testing prerequisites since the generated script uses those modules. SEE ALSO This module was indirectly inspired by Module::Install::External's requires_external_bin command. SUPPORT Perldoc You can find documentation for this module with the perldoc command. perldoc Dist::Zilla::Plugin::RequiresExternal Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. * Search CPAN The default CPAN search engine, useful to view POD in HTML format. http://search.cpan.org/dist/Dist-Zilla-Plugin-RequiresExternal * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. http://annocpan.org/dist/Dist-Zilla-Plugin-RequiresExternal * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. http://cpanratings.perl.org/d/Dist-Zilla-Plugin-RequiresExternal * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. http://cpants.cpanauthors.org/dist/Dist-Zilla-Plugin-RequiresExternal * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. http://www.cpantesters.org/distro/D/Dist-Zilla-Plugin-RequiresExternal * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. http://matrix.cpantesters.org/?dist=Dist-Zilla-Plugin-RequiresExternal * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. http://deps.cpantesters.org/?module=Dist::Zilla::Plugin::RequiresExternal Bugs / Feature Requests Please report any bugs or feature requests through the web interface at https://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal/issues. You will be automatically notified of any progress on the request by the system. Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) https://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal git clone git://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal.git AUTHOR Mark Gardner COPYRIGHT AND LICENSE This software is copyright (c) 2015 by GSI Commerce. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Changes100644000765000024 305712637665701 20667 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006Revision history for perl module Dist::Zilla::Plugin::RequiresExternal 1.006 2015-12-26 23:40:29-05:00 America/New_York - use "#!/usr/bin/env perl" in test scripts for those who need them 1.005 2015-06-09 10:51:55-06:00 America/Denver - Reduce CPAN dependencies by using Pod::Weaver::Plugin::SingleEncoding rather than ::Encoding (thanks AWSWENSON) - Ensure portability and synopsis tests are called/not called correctly (thanks SROMANOV) - Reduce cognitive load of switching between Moose and Moo by using MooseX::AttributeShortcuts rather than MooseX::Has::Sugar - Explicitly declare more developer and version dependencies where needed - Reduce perlbrew release testing time by turning off dependency tests 1.004 2011-08-28 23:35:54 America/New_York - Hopefully fix a longstanding testing bug where some smokers didn't have perl in their PATHs 1.003 2011-08-26 14:39:08 America/New_York - Changes to dist.ini to set MetaCPAN home page and automatically test against a selection of brewed perls 1.002 2011-08-26 14:22:56 America/New_York - Allow attributes to be undef - Reorganize code so Dist::Zilla and Pod::Weaver don't scramble it too badly 1.001 2011-05-23 12:25:26 America/New_York - Update POD and copyright. No code changes. 1.000 2011-02-18 13:39:38 America/New_York - New "fatal" attribute to make all tests fail if requires_external fails 0.1091005 2011-02-17 00:41:15 America/New_York - Better documentation and examples 0.001091 2011-02-16 19:54:20 America/New_York - Initial release LICENSE100644000765000024 4365512637665701 20431 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006This software is copyright (c) 2015 by GSI Commerce. 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) 2015 by GSI Commerce. 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) 2015 by GSI Commerce. 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 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End INSTALL100644000765000024 213312637665701 20417 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006This is the Perl distribution Dist-Zilla-Plugin-RequiresExternal. Installing Dist-Zilla-Plugin-RequiresExternal is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Dist::Zilla::Plugin::RequiresExternal If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Dist::Zilla::Plugin::RequiresExternal ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Dist::Zilla::Plugin::RequiresExternal ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation Dist-Zilla-Plugin-RequiresExternal documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Dist::Zilla::Plugin::RequiresExternal dist.ini100644000765000024 325512637665701 21040 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006name = Dist-Zilla-Plugin-RequiresExternal author = Mark Gardner license = Perl_5 copyright_holder = GSI Commerce [@Filter] -bundle = @Basic -remove = Readme [AutoPrereqs] [Prereqs / RuntimeRequires] perl = 5.010 Env::Path = 0.18 Test::Most = 0 [Prereqs / DevelopRequires] Perl::Critic::Lax = 0 Perl::Critic::Pulp = 0 Perl::Critic::StricterSubs = 0 Pod::Weaver = 4.000 Pod::Weaver::Plugin::StopWords = 0 Pod::Weaver::Section::Support = 0 Dist::Zilla::Plugin::Test::Synopsis = 2.000004 [NextRelease] [OurPkgVersion] [PodWeaver] replacer = replace_with_comment post_code_replacer = replace_with_nothing [MetaProvides::Package] [@TestingMania] disable = Test::Portability ; roll our own to skip LocalBrew test files critic_config = xt/author/perlcritic.rc strict_version = 1 [Test::ChangesHasContent] [PerlTidy] perltidyrc = xt/author/perltidy.rc [ReadmeAnyFromPod] [ReadmeAnyFromPod / ReadmePodInRoot] type = markdown filename = README.md location = root [ReportVersions] [InstallGuide] [MetaJSON] [Test::LocalBrew] notest_deps = 1 nobrew = 1 brews = perl-5.10.1-TEST brews = perl-5.12.5-TEST brews = perl-5.14.4-TEST brews = perl-5.16.3-TEST brews = perl-5.18.4-TEST brews = perl-5.20.3-TEST brews = perl-5.22.1-TEST brews = perl-latest-TEST [@GitHub] metacpan = 1 [Git::NextVersion] [Git::CommitBuild] branch = release_branch = release multiple_inheritance = 1 [@Git] allow_dirty = README.md branch = release [InstallRelease] ;authordep Perl::Critic::Lax ;authordep Perl::Critic::Pulp ;authordep Perl::Critic::StricterSubs ;authordep Pod::Weaver::Plugin::StopWords ;authordep Pod::Weaver::Section::Support t000755000765000024 012637665701 17472 5ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006test.t100755000765000024 211512637665701 21000 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!/usr/bin/env perl use Modern::Perl '2010'; ## no critic (Modules::ProhibitUseQuotedVersion) use Config; use English '-no_match_vars'; use Test::Most tests => 3; use Test::DZil; use Env::Path 'PATH'; use Path::Class; my $perl = file($EXECUTABLE_NAME); if ( $OSNAME ne 'VMS' ) { $perl = file("$perl$Config{_exe}") unless $perl =~ m/$Config{_exe}$/i; } PATH->Prepend( $perl->dir->stringify() ); my $tzil = Builder->from_config( { dist_root => 1 }, { add_files => { 'source/dist.ini' => simple_ini( ['@Basic'], [ RequiresExternal => { requires => [ "$perl", $perl->basename ] }, ], ), 'source/lib/DZT/Sample.pm' => <<'END_SAMPLE_PM' } } ); package DZT::Sample; # ABSTRACT: Sample package 1; END_SAMPLE_PM lives_ok( sub { $tzil->build() }, 'build' ); ok( ( grep { $ARG->name eq 't/requires_external.t' } @{ $tzil->files } ), 'test script added' ); lives_ok( sub { $tzil->run_tests_in( $tzil->built_in ) }, "run DZ tests: $perl executable and added to PATH", ); META.yml100644000765000024 267412637665701 20651 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006--- abstract: 'make dists require external commands' author: - 'Mark Gardner ' build_requires: Carp: '0' English: '0' Env::Path: '0.18' File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Scalar::Util: '0' Test::DZil: '0' Test::More: '0.94' Test::Most: '0' blib: '1.01' perl: '5.010' strict: '0' warnings: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.042, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Dist-Zilla-Plugin-RequiresExternal provides: Dist::Zilla::Plugin::RequiresExternal: file: lib/Dist/Zilla/Plugin/RequiresExternal.pm version: '1.006' requires: Dist::Zilla::File::InMemory: '0' Dist::Zilla::Role::FileGatherer: '0' Dist::Zilla::Role::MetaProvider: '0' Dist::Zilla::Role::Plugin: '0' Dist::Zilla::Role::TextTemplate: '0' Env::Path: '0.18' List::MoreUtils: '0' Modern::Perl: '0' Moose: '0' MooseX::AttributeShortcuts: '0' MooseX::Types::Moose: '0' Path::Class: '0' Test::Most: '0' namespace::autoclean: '0' perl: '5.010' utf8: '0' resources: bugtracker: https://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal/issues homepage: http://metacpan.org/release/Dist-Zilla-Plugin-RequiresExternal/ repository: git://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal.git version: '1.006' MANIFEST100644000765000024 207512637665701 20524 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.042. Changes INSTALL LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README dist.ini lib/Dist/Zilla/Plugin/RequiresExternal.pm t/00-compile.t t/000-report-versions.t t/author-critic.t t/author-eol.t t/author-mojibake.t t/author-no-tabs.t t/author-pod-coverage.t t/author-pod-syntax.t t/author-test-version.t t/fatal.t t/release-changes_has_content.t t/release-cpan-changes.t t/release-dist-manifest.t t/release-distmeta.t t/release-kwalitee.t t/release-localbrew-perl-5.10.1-TEST.t t/release-localbrew-perl-5.12.5-TEST.t t/release-localbrew-perl-5.14.4-TEST.t t/release-localbrew-perl-5.16.3-TEST.t t/release-localbrew-perl-5.18.4-TEST.t t/release-localbrew-perl-5.20.3-TEST.t t/release-localbrew-perl-5.22.1-TEST.t t/release-localbrew-perl-latest-TEST.t t/release-meta-json.t t/release-minimum-version.t t/release-pod-linkcheck.t t/release-portability.t t/release-synopsis.t t/release-system-localbrew.t t/release-unused-vars.t t/test.t weaver.ini xt/author/perlcritic.rc xt/author/perltidy.rc fatal.t100755000765000024 157612637665701 21122 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!/usr/bin/env perl use Modern::Perl '2010'; ## no critic (Modules::ProhibitUseQuotedVersion) use English '-no_match_vars'; use Test::Most tests => 3; use Test::DZil; my $tzil = Builder->from_config( { dist_root => 1 }, { add_files => { 'source/dist.ini' => simple_ini( ['@Basic'], [ RequiresExternal => { fatal => 1, requires => ['this_is_supposed_to_fail'], }, ], ), 'source/lib/DZT/Sample.pm' => <<'END_SAMPLE_PM', package DZT::Sample; # ABSTRACT: Sample package 1; END_SAMPLE_PM }, }, ); lives_ok( sub { $tzil->build() }, 'build' ); ok( ( grep { $ARG->name eq 't/000-requires_external.t' } @{ $tzil->files } ), 'test script added' ); dies_ok( sub { $tzil->run_tests_in( $tzil->built_in ) }, 'test' ); META.json100644000765000024 647012637665701 21017 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006{ "abstract" : "make dists require external commands", "author" : [ "Mark Gardner " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.042, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Dist-Zilla-Plugin-RequiresExternal", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Dist::Zilla::Plugin::Test::Synopsis" : "2.000004", "Perl::Critic::Lax" : "0", "Perl::Critic::Pulp" : "0", "Perl::Critic::StricterSubs" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Weaver" : "4.000", "Pod::Weaver::Plugin::StopWords" : "0", "Pod::Weaver::Section::Support" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CPAN::Meta::JSON" : "0.16", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::Mojibake" : "0", "Test::More" : "0.88", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Pod::LinkCheck" : "0", "Test::Synopsis" : "0", "Test::Version" : "1" } }, "runtime" : { "requires" : { "Dist::Zilla::File::InMemory" : "0", "Dist::Zilla::Role::FileGatherer" : "0", "Dist::Zilla::Role::MetaProvider" : "0", "Dist::Zilla::Role::Plugin" : "0", "Dist::Zilla::Role::TextTemplate" : "0", "Env::Path" : "0.18", "List::MoreUtils" : "0", "Modern::Perl" : "0", "Moose" : "0", "MooseX::AttributeShortcuts" : "0", "MooseX::Types::Moose" : "0", "Path::Class" : "0", "Test::Most" : "0", "namespace::autoclean" : "0", "perl" : "5.010", "utf8" : "0" } }, "test" : { "requires" : { "Carp" : "0", "English" : "0", "Env::Path" : "0.18", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Scalar::Util" : "0", "Test::DZil" : "0", "Test::More" : "0.94", "Test::Most" : "0", "blib" : "1.01", "perl" : "5.010", "strict" : "0", "warnings" : "0" } } }, "provides" : { "Dist::Zilla::Plugin::RequiresExternal" : { "file" : "lib/Dist/Zilla/Plugin/RequiresExternal.pm", "version" : "1.006" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal/issues" }, "homepage" : "http://metacpan.org/release/Dist-Zilla-Plugin-RequiresExternal/", "repository" : { "type" : "git", "url" : "git://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal.git", "web" : "https://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal" } }, "version" : "1.006" } weaver.ini100644000765000024 171712637665701 21367 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006[@CorePrep] [-SingleEncoding] encoding = utf8 [-StopWords] [Region / :stopwords] [Name] [Version] [Region / prelude] [Region / test_synopsis] [Generic / SYNOPSIS] [Generic / USAGE] [Generic / DESCRIPTION] [Generic / OVERVIEW] [Generic / REQUIRED ARGUMENTS] [Generic / OPTIONS] [Collect / ATTRIBUTES] command = attr [Collect / METHODS] command = method [Collect / FUNCTIONS] command = func [Collect / TYPES] command = type [Generic / DIAGNOSTICS] [Generic / EXIT STATUS] [Generic / CONFIGURATION] [Generic / CONFIGURATION AND ENVIRONMENT] [Generic / DEPENDENCIES] [Generic / INCOMPATIBILITIES] [Leftovers] [Region / postlude] [Support] all_modules = 1 bugs = metadata bugs_content = Please report any bugs or feature requests through the web bugs_content = interface at {WEB}. You will be automatically notified of any bugs_content = progress on the request by the system. websites = search, anno, ratings, kwalitee, testers, testmatrix, deps [Authors] [Legal] Makefile.PL100644000765000024 460512637665701 21346 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.042. use strict; use warnings; use 5.010; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "make dists require external commands", "AUTHOR" => "Mark Gardner ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Dist-Zilla-Plugin-RequiresExternal", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.010", "NAME" => "Dist::Zilla::Plugin::RequiresExternal", "PREREQ_PM" => { "Dist::Zilla::File::InMemory" => 0, "Dist::Zilla::Role::FileGatherer" => 0, "Dist::Zilla::Role::MetaProvider" => 0, "Dist::Zilla::Role::Plugin" => 0, "Dist::Zilla::Role::TextTemplate" => 0, "Env::Path" => "0.18", "List::MoreUtils" => 0, "Modern::Perl" => 0, "Moose" => 0, "MooseX::AttributeShortcuts" => 0, "MooseX::Types::Moose" => 0, "Path::Class" => 0, "Test::Most" => 0, "namespace::autoclean" => 0, "utf8" => 0 }, "TEST_REQUIRES" => { "Carp" => 0, "English" => 0, "Env::Path" => "0.18", "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Scalar::Util" => 0, "Test::DZil" => 0, "Test::More" => "0.94", "Test::Most" => 0, "blib" => "1.01", "strict" => 0, "warnings" => 0 }, "VERSION" => "1.006", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Dist::Zilla::File::InMemory" => 0, "Dist::Zilla::Role::FileGatherer" => 0, "Dist::Zilla::Role::MetaProvider" => 0, "Dist::Zilla::Role::Plugin" => 0, "Dist::Zilla::Role::TextTemplate" => 0, "English" => 0, "Env::Path" => "0.18", "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "List::MoreUtils" => 0, "Modern::Perl" => 0, "Moose" => 0, "MooseX::AttributeShortcuts" => 0, "MooseX::Types::Moose" => 0, "Path::Class" => 0, "Scalar::Util" => 0, "Test::DZil" => 0, "Test::More" => "0.94", "Test::Most" => 0, "blib" => "1.01", "namespace::autoclean" => 0, "strict" => 0, "utf8" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); MANIFEST.SKIP100644000765000024 223512637665701 21267 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006 #!start included /Users/mjg/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this \b_eumm/ # 7.05_05 and above # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # and Module::Build::Tiny generated files \b_build_params$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ \..*\.sw.?$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover and Devel::CoverX::Covered files. \bcover_db\b \bcovered\b # Avoid prove files \B\.prove$ # Avoid MYMETA files ^MYMETA\. #!end included /Users/mjg/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/ExtUtils/MANIFEST.SKIP 00-compile.t100644000765000024 235712637665701 21673 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/tuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More; plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Dist/Zilla/Plugin/RequiresExternal.pm' ); # no fake home requested my $inc_switch = -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; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-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}; author-eol.t100644000765000024 271512637665701 22103 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Dist/Zilla/Plugin/RequiresExternal.pm', 't/00-compile.t', 't/000-report-versions.t', 't/author-critic.t', 't/author-eol.t', 't/author-mojibake.t', 't/author-no-tabs.t', 't/author-pod-coverage.t', 't/author-pod-syntax.t', 't/author-test-version.t', 't/fatal.t', 't/release-changes_has_content.t', 't/release-cpan-changes.t', 't/release-dist-manifest.t', 't/release-distmeta.t', 't/release-kwalitee.t', 't/release-localbrew-perl-5.10.1-TEST.t', 't/release-localbrew-perl-5.12.5-TEST.t', 't/release-localbrew-perl-5.14.4-TEST.t', 't/release-localbrew-perl-5.16.3-TEST.t', 't/release-localbrew-perl-5.18.4-TEST.t', 't/release-localbrew-perl-5.20.3-TEST.t', 't/release-localbrew-perl-5.22.1-TEST.t', 't/release-localbrew-perl-latest-TEST.t', 't/release-meta-json.t', 't/release-minimum-version.t', 't/release-pod-linkcheck.t', 't/release-portability.t', 't/release-synopsis.t', 't/release-system-localbrew.t', 't/release-unused-vars.t', 't/test.t' ); eol_unix_ok( $_, { trailing_whitespace => 1 } ) foreach @files; done_testing; author-critic.t100644000765000024 75112637665701 22557 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings; use Test::More; use English qw(-no_match_vars); eval "use Test::Perl::Critic"; plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; Test::Perl::Critic->import( -profile => "xt/author/perlcritic.rc" ) if -e "xt/author/perlcritic.rc"; all_critic_ok(); author-no-tabs.t100644000765000024 266112637665701 22667 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Dist/Zilla/Plugin/RequiresExternal.pm', 't/00-compile.t', 't/000-report-versions.t', 't/author-critic.t', 't/author-eol.t', 't/author-mojibake.t', 't/author-no-tabs.t', 't/author-pod-coverage.t', 't/author-pod-syntax.t', 't/author-test-version.t', 't/fatal.t', 't/release-changes_has_content.t', 't/release-cpan-changes.t', 't/release-dist-manifest.t', 't/release-distmeta.t', 't/release-kwalitee.t', 't/release-localbrew-perl-5.10.1-TEST.t', 't/release-localbrew-perl-5.12.5-TEST.t', 't/release-localbrew-perl-5.14.4-TEST.t', 't/release-localbrew-perl-5.16.3-TEST.t', 't/release-localbrew-perl-5.18.4-TEST.t', 't/release-localbrew-perl-5.20.3-TEST.t', 't/release-localbrew-perl-5.22.1-TEST.t', 't/release-localbrew-perl-latest-TEST.t', 't/release-meta-json.t', 't/release-minimum-version.t', 't/release-pod-linkcheck.t', 't/release-portability.t', 't/release-synopsis.t', 't/release-system-localbrew.t', 't/release-unused-vars.t', 't/test.t' ); notabs_ok($_) foreach @files; done_testing; author-mojibake.t100644000765000024 43512637665701 23062 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); release-synopsis.t100644000765000024 35112637665701 23303 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::Synopsis; all_synopsis_ok(); release-kwalitee.t100644000765000024 56712637665701 23232 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.12 use strict; use warnings; use Test::More 0.88; use Test::Kwalitee 1.21 'kwalitee_ok'; kwalitee_ok(); done_testing; release-distmeta.t100644000765000024 46412637665701 23233 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use Test::CPAN::Meta; meta_yaml_ok(); author000755000765000024 012637665701 21164 5ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/xtperltidy.rc100644000765000024 106412637665701 23507 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/xt/author-l=78 # Max line width is 78 cols -i=4 # Indent level is 4 cols -ci=4 # Continuation indent is 4 cols -vt=2 # Maximal vertical tightness -cti=0 # No extra indentation for closing brackets -pt=1 # Medium parenthesis tightness -bt=1 # Medium brace tightness -sbt=1 # Medium square bracket tightness -bbt=1 # Medium block brace tightness -nsfs # No space before semicolons -nolq # Don't outdent long quoted strings -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" # Break before all operators author-pod-syntax.t100644000765000024 53712637665701 23412 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } # 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(); release-meta-json.t100644000765000024 35512637665701 23315 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::CPAN::Meta::JSON; meta_json_ok(); perlcritic.rc100644000765000024 237012637665701 24014 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/xt/authorseverity = brutal verbose = 8 exclude = Modules::RequirePerlVersion Editor::RequireEmacsFileVariables Miscellanea::RequireRcsKeywords Modules::RequireExplicitInclusion Modules::RequireExplicitPackage Tics::ProhibitLongLines CodeLayout::ProhibitHashBarewords [Lax::RequireExplicitPackage::ExceptForPragmata] allowed_pragmata = diagnostics feature perlversion strict warnings utf8 [CodeLayout::RequireTidyCode] perltidyrc = xt/author/perltidy.rc # since we're using Modern::Perl [Compatibility::PerlMinimumVersionAndWhy] above_version = 5.010 [Compatibility::PodMinimumVersion] above_version = 5.010 [Documentation::PodSpelling] stop_words = Perldoc perldoc annonations PASSed dists executables metadata plugin [Documentation::RequirePodSections] lib_sections = NAME | VERSION | DESCRIPTION | SYNOPSIS | COPYRIGHT AND LICENSE script_sections = NAME | USAGE | OPTIONS | EXIT STATUS | COPYRIGHT AND LICENSE [Subroutines::ProhibitCallsToUndeclaredSubs] exempt_subs = Moose::has Moose::with MooseX::Has::Sugar::auto_deref MooseX::Has::Sugar::lazy MooseX::Has::Sugar::required MooseX::Has::Sugar::ro Path::Class::file [TestingAndDebugging::RequireUseStrict] equivalent_modules = Modern::Perl [TestingAndDebugging::RequireUseWarnings] equivalent_modules = Modern::Perl release-portability.t100755000765000024 121612637665701 24002 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!/usr/bin/env perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } BEGIN { if ( not $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Modern::Perl '2010'; ## no critic (Modules::ProhibitUseQuotedVersion) use Test::More; eval 'use Test::Portability::Files'; plan skip_all => 'Test::Portability::Files required for testing portability' if $@; options( test_one_dot => 0 ); run_tests(); release-unused-vars.t100644000765000024 66212637665701 23675 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More 0.96 tests => 1; eval { require Test::Vars }; SKIP: { skip 1 => 'Test::Vars required for testing for unused vars' if $@; Test::Vars->import; subtest 'unused vars' => sub { all_vars_ok(); }; } author-pod-coverage.t100644000765000024 62312637665701 23653 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok( { coverage_class => 'Pod::Coverage::TrustPod' } ); author-test-version.t100644000765000024 111112637665701 23753 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t BEGIN { unless ( $ENV{AUTHOR_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for testing by the author' ); } } use strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.05 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 1, has_version => 1, multiple => 0, }; push @imports, $params if version->parse($Test::Version::VERSION) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; 000-report-versions.t100644000765000024 3206712637665701 23525 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl use warnings; use strict; use Test::More 0.94; # Include a cut-down version of YAML::Tiny so we don't introduce unnecessary # dependencies ourselves. package Local::YAML::Tiny; use strict; use Carp 'croak'; # UTF Support? sub HAVE_UTF8 () { $] >= 5.007003 } BEGIN { if (HAVE_UTF8) { # The string eval helps hide this from Test::MinimumVersion eval "require utf8;"; die "Failed to load UTF-8 support" if $@; } # Class structure require 5.004; $YAML::Tiny::VERSION = '1.40'; # Error storage $YAML::Tiny::errstr = ''; } # Printable characters for escapes my %UNESCAPES = ( z => "\x00", a => "\x07", t => "\x09", n => "\x0a", v => "\x0b", f => "\x0c", r => "\x0d", e => "\x1b", '\\' => '\\', ); ##################################################################### # Implementation # Create an empty YAML::Tiny object sub new { my $class = shift; bless [@_], $class; } # Create an object from a file sub read { my $class = ref $_[0] ? ref shift : shift; # Check the file my $file = shift or return $class->_error('You did not specify a file name'); return $class->_error("File '$file' does not exist") unless -e $file; return $class->_error("'$file' is a directory, not a file") unless -f _; return $class->_error("Insufficient permissions to read '$file'") unless -r _; # Slurp in the file local $/ = undef; local *CFG; unless ( open( CFG, $file ) ) { return $class->_error("Failed to open file '$file': $!"); } my $contents = ; unless ( close(CFG) ) { return $class->_error("Failed to close file '$file': $!"); } $class->read_string($contents); } # Create an object from a string sub read_string { my $class = ref $_[0] ? ref shift : shift; my $self = bless [], $class; my $string = $_[0]; unless ( defined $string ) { return $self->_error("Did not provide a string to load"); } # Byte order marks # NOTE: Keeping this here to educate maintainers # my %BOM = ( # "\357\273\277" => 'UTF-8', # "\376\377" => 'UTF-16BE', # "\377\376" => 'UTF-16LE', # "\377\376\0\0" => 'UTF-32LE' # "\0\0\376\377" => 'UTF-32BE', # ); if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) { return $self->_error("Stream has a non UTF-8 BOM"); } else { # Strip UTF-8 bom if found, we'll just ignore it $string =~ s/^\357\273\277//; } # Try to decode as utf8 utf8::decode($string) if HAVE_UTF8; # Check for some special cases return $self unless length $string; unless ( $string =~ /[\012\015]+\z/ ) { return $self->_error("Stream does not end with newline character"); } # Split the file into lines my @lines = grep { !/^\s*(?:\#.*)?\z/ } split /(?:\015{1,2}\012|\015|\012)/, $string; # Strip the initial YAML header @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ and shift @lines; # A nibbling parser while (@lines) { # Do we have a document header? if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) { # Handle scalar documents shift @lines; if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) { push @$self, $self->_read_scalar( "$1", [undef], \@lines ); next; } } if ( !@lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) { # A naked document push @$self, undef; while ( @lines and $lines[0] !~ /^---/ ) { shift @lines; } } elsif ( $lines[0] =~ /^\s*\-/ ) { # An array at the root my $document = []; push @$self, $document; $self->_read_array( $document, [0], \@lines ); } elsif ( $lines[0] =~ /^(\s*)\S/ ) { # A hash at the root my $document = {}; push @$self, $document; $self->_read_hash( $document, [ length($1) ], \@lines ); } else { croak("YAML::Tiny failed to classify the line '$lines[0]'"); } } $self; } # Deparse a scalar string to the actual scalar sub _read_scalar { my ( $self, $string, $indent, $lines ) = @_; # Trim trailing whitespace $string =~ s/\s*\z//; # Explitic null/undef return undef if $string eq '~'; # Quotes if ( $string =~ /^\'(.*?)\'\z/ ) { return '' unless defined $1; $string = $1; $string =~ s/\'\'/\'/g; return $string; } if ( $string =~ /^\"((?:\\.|[^\"])*)\"\z/ ) { # Reusing the variable is a little ugly, # but avoids a new variable and a string copy. $string = $1; $string =~ s/\\"/"/g; $string =~ s/\\([never\\fartz]|x([0-9a-fA-F]{2}))/(length($1)>1)?pack("H2",$2):$UNESCAPES{$1}/gex; return $string; } # Special cases if ( $string =~ /^[\'\"!&]/ ) { croak("YAML::Tiny does not support a feature in line '$lines->[0]'"); } return {} if $string eq '{}'; return [] if $string eq '[]'; # Regular unquoted string return $string unless $string =~ /^[>|]/; # Error croak("YAML::Tiny failed to find multi-line scalar content") unless @$lines; # Check the indent depth $lines->[0] =~ /^(\s*)/; $indent->[-1] = length("$1"); if ( defined $indent->[-2] and $indent->[-1] <= $indent->[-2] ) { croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); } # Pull the lines my @multiline = (); while (@$lines) { $lines->[0] =~ /^(\s*)/; last unless length($1) >= $indent->[-1]; push @multiline, substr( shift(@$lines), length($1) ); } my $j = ( substr( $string, 0, 1 ) eq '>' ) ? ' ' : "\n"; my $t = ( substr( $string, 1, 1 ) eq '-' ) ? '' : "\n"; return join( $j, @multiline ) . $t; } # Parse an array sub _read_array { my ( $self, $array, $indent, $lines ) = @_; while (@$lines) { # Check for a new document if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { while ( @$lines and $lines->[0] !~ /^---/ ) { shift @$lines; } return 1; } # Check the indent level $lines->[0] =~ /^(\s*)/; if ( length($1) < $indent->[-1] ) { return 1; } elsif ( length($1) > $indent->[-1] ) { croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); } if ( $lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/ ) { # Inline nested hash my $indent2 = length("$1"); $lines->[0] =~ s/-/ /; push @$array, {}; $self->_read_hash( $array->[-1], [ @$indent, $indent2 ], $lines ); } elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) { # Array entry with a value shift @$lines; push @$array, $self->_read_scalar( "$2", [ @$indent, undef ], $lines ); } elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) { shift @$lines; unless (@$lines) { push @$array, undef; return 1; } if ( $lines->[0] =~ /^(\s*)\-/ ) { my $indent2 = length("$1"); if ( $indent->[-1] == $indent2 ) { # Null array entry push @$array, undef; } else { # Naked indenter push @$array, []; $self->_read_array( $array->[-1], [ @$indent, $indent2 ], $lines ); } } elsif ( $lines->[0] =~ /^(\s*)\S/ ) { push @$array, {}; $self->_read_hash( $array->[-1], [ @$indent, length("$1") ], $lines ); } else { croak("YAML::Tiny failed to classify line '$lines->[0]'"); } } elsif ( defined $indent->[-2] and $indent->[-1] == $indent->[-2] ) { # This is probably a structure like the following... # --- # foo: # - list # bar: value # # ... so lets return and let the hash parser handle it return 1; } else { croak("YAML::Tiny failed to classify line '$lines->[0]'"); } } return 1; } # Parse an array sub _read_hash { my ( $self, $hash, $indent, $lines ) = @_; while (@$lines) { # Check for a new document if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { while ( @$lines and $lines->[0] !~ /^---/ ) { shift @$lines; } return 1; } # Check the indent level $lines->[0] =~ /^(\s*)/; if ( length($1) < $indent->[-1] ) { return 1; } elsif ( length($1) > $indent->[-1] ) { croak("YAML::Tiny found bad indenting in line '$lines->[0]'"); } # Get the key unless ( $lines->[0] =~ s/^\s*([^\'\" ][^\n]*?)\s*:(\s+|$)// ) { if ( $lines->[0] =~ /^\s*[?\'\"]/ ) { croak( "YAML::Tiny does not support a feature in line '$lines->[0]'" ); } croak("YAML::Tiny failed to classify line '$lines->[0]'"); } my $key = $1; # Do we have a value? if ( length $lines->[0] ) { # Yes $hash->{$key} = $self->_read_scalar( shift(@$lines), [ @$indent, undef ], $lines ); } else { # An indent shift @$lines; unless (@$lines) { $hash->{$key} = undef; return 1; } if ( $lines->[0] =~ /^(\s*)-/ ) { $hash->{$key} = []; $self->_read_array( $hash->{$key}, [ @$indent, length($1) ], $lines ); } elsif ( $lines->[0] =~ /^(\s*)./ ) { my $indent2 = length("$1"); if ( $indent->[-1] >= $indent2 ) { # Null hash entry $hash->{$key} = undef; } else { $hash->{$key} = {}; $self->_read_hash( $hash->{$key}, [ @$indent, length($1) ], $lines ); } } } } return 1; } # Set error sub _error { $YAML::Tiny::errstr = $_[1]; undef; } # Retrieve error sub errstr { $YAML::Tiny::errstr; } ##################################################################### # Use Scalar::Util if possible, otherwise emulate it BEGIN { eval { require Scalar::Util; }; if ($@) { # Failed to load Scalar::Util eval <<'END_PERL'; sub refaddr { my $pkg = ref($_[0]) or return undef; if (!!UNIVERSAL::can($_[0], 'can')) { bless $_[0], 'Scalar::Util::Fake'; } else { $pkg = undef; } "$_[0]" =~ /0x(\w+)/; my $i = do { local $^W; hex $1 }; bless $_[0], $pkg if defined $pkg; $i; } END_PERL } else { Scalar::Util->import('refaddr'); } } ##################################################################### # main test ##################################################################### package main; BEGIN { # Skip modules that either don't want to be loaded directly, such as # Module::Install, or that mess with the test count, such as the Test::* # modules listed here. # # Moose::Role conflicts if Moose is loaded as well, but Moose::Role is in # the Moose distribution and it's certain that someone who uses # Moose::Role also uses Moose somewhere, so if we disallow Moose::Role, # we'll still get the relevant version number. my %skip = map { $_ => 1 } qw( App::FatPacker Class::Accessor::Classy Devel::Cover Module::Install Moose::Role POE::Loop::Tk Template::Test Test::Kwalitee Test::Pod::Coverage Test::Portability::Files Test::YAML::Meta open ); my $Test = Test::Builder->new; $Test->plan( skip_all => "META.yml could not be found" ) unless -f 'META.yml' and -r _; my $meta = ( Local::YAML::Tiny->read('META.yml') )->[0]; my %requires; for my $require_key ( grep {/requires/} keys %$meta ) { my %h = %{ $meta->{$require_key} }; $requires{$_}++ for keys %h; } delete $requires{perl}; diag("Testing with Perl $], $^X"); for my $module ( sort keys %requires ) { if ( $skip{$module} ) { note "$module doesn't want to be loaded directly, skipping"; next; } local $SIG{__WARN__} = sub { note "$module: $_[0]" }; require_ok $module or BAIL_OUT("can't load $module"); my $version = $module->VERSION; $version = 'undefined' unless defined $version; diag(" $module version is $version"); } done_testing; } release-cpan-changes.t100644000765000024 55412637665701 23750 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); release-dist-manifest.t100644000765000024 52312637665701 24164 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval "use Test::DistManifest"; plan skip_all => "Test::DistManifest required for testing the manifest" if $@; manifest_ok(); release-pod-linkcheck.t100644000765000024 105712637665701 24153 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use Test::More; foreach my $env_skip ( qw( SKIP_POD_LINKCHECK ) ) { plan skip_all => "\$ENV{$env_skip} is set, skipping" if $ENV{$env_skip}; } eval "use Test::Pod::LinkCheck"; if ($@) { plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; } else { Test::Pod::LinkCheck->new->all_pod_ok; } release-minimum-version.t100644000765000024 56312637665701 24557 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More; eval "use Test::MinimumVersion"; plan skip_all => "Test::MinimumVersion required for testing minimum versions" if $@; all_minimum_version_from_metayml_ok(); release-system-localbrew.t100644000765000024 675312637665701 24744 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-changes_has_content.t100644000765000024 232312637665701 25432 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use Test::More tests => 2; note 'Checking Changes'; my $changes_file = 'Changes'; my $newver = '1.006'; my $trial_token = '-TRIAL'; SKIP: { ok( -e $changes_file, "$changes_file file exists" ) or skip 'Changes is missing', 1; ok( _get_changes($newver), "$changes_file has content for $newver" ); } done_testing; # _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit # by Jerome Quelin sub _get_changes { my $newver = shift; # parse changelog to find commit message open( my $fh, '<', $changes_file ) or die "cannot open $changes_file: $!"; my $changelog = join( '', <$fh> ); close $fh; my @content = grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented split /\n/, $changelog; shift @content; # drop the version line # drop unindented last line and trailing blank lines pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ ); # return number of non-blank lines return scalar @content; } release-localbrew-perl-5.10.1-TEST.t100644000765000024 677312637665701 25661 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.10.1-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-5.12.5-TEST.t100644000765000024 677312637665701 25667 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.12.5-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-5.14.4-TEST.t100644000765000024 677312637665701 25670 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.14.4-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-5.16.3-TEST.t100644000765000024 677312637665701 25671 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.16.3-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-5.18.4-TEST.t100644000765000024 677312637665701 25674 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.18.4-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-5.20.3-TEST.t100644000765000024 677312637665701 25664 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.20.3-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-5.22.1-TEST.t100644000765000024 677312637665701 25664 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-5.22.1-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } release-localbrew-perl-latest-TEST.t100644000765000024 677312637665701 26433 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/t#!perl BEGIN { unless ( $ENV{RELEASE_TESTING} ) { require Test::More; Test::More::plan( skip_all => 'these tests are for release candidate testing' ); } } use strict; use warnings; use FindBin; use File::Copy qw(copy); use File::Spec; use File::Temp; use Test::More; sub copy_log_file { my ($home) = @_; my $log_file = File::Spec->catfile( $home, '.cpanm', 'build.log' ); my $tempfile = File::Temp->new( SUFFIX => '.log', UNLINK => 0, ); copy( $log_file, $tempfile->filename ); diag("For details, please consult $tempfile"); } sub is_dist_root { my (@path) = @_; return -e File::Spec->catfile( @path, 'Makefile.PL' ) || -e File::Spec->catfile( @path, 'Build.PL' ); } delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/}; unless ( $ENV{'PERLBREW_ROOT'} ) { plan skip_all => "Environment variable 'PERLBREW_ROOT' not found"; exit; } my $brew = q[perl-latest-TEST]; my $cpanm_path = qx(which cpanm 2>/dev/null); unless ($cpanm_path) { plan skip_all => "The 'cpanm' program is required to run this test"; exit; } chomp $cpanm_path; my $perlbrew_bin = File::Spec->catdir( $ENV{'PERLBREW_ROOT'}, 'perls', $brew, 'bin' ); my $perlbrew_path = $ENV{'PATH'}; if ( my $local_lib_root = $ENV{'PERL_LOCAL_LIB_ROOT'} ) { my @path = File::Spec->path; while ( @path && $path[0] =~ /^$local_lib_root/ ) { shift @path; } if ( $^O eq 'MSWin32' ) { $perlbrew_path = join( ';', @path ); } else { $perlbrew_path = join( ':', @path ); } } my ( $env, $status ) = do { local $ENV{'PATH'} = $perlbrew_path; local $ENV{'SHELL'} = '/bin/bash'; # fool perlbrew ( scalar(qx(perlbrew env $brew)), $? ); }; unless ( $status == 0 ) { plan skip_all => "No such perlbrew environment '$brew'"; exit; } my @lines = split /\n/, $env; foreach my $line (@lines) { if ( $line =~ /^\s*export\s+([0-9a-zA-Z_]+)=(.*)$/ ) { my ( $k, $v ) = ( $1, $2 ); if ( $v =~ /^("|')(.*)\1$/ ) { $v = $2; $v =~ s!\\(.)!$1!ge; } $ENV{$k} = $v; } elsif ( $line =~ /^unset\s+([0-9a-zA-Z_]+)/ ) { delete $ENV{$1}; } } my $pristine_path = do { local $ENV{'PATH'} = $perlbrew_path; qx(perlbrew display-pristine-path); }; chomp $pristine_path; $ENV{'PATH'} = join( ':', $ENV{'PERLBREW_PATH'}, $pristine_path ); plan tests => 1; my $tmpdir = File::Temp->newdir; my $tmphome = File::Temp->newdir; my $pid = fork; if ( !defined $pid ) { fail "Forking failed!"; exit 1; } elsif ($pid) { waitpid $pid, 0; ok !$?, "cpanm should successfully install your dist with no issues" or copy_log_file( $tmphome->dirname ); } else { open STDIN, '<', File::Spec->devnull; open STDOUT, '>', File::Spec->devnull; open STDERR, '>', File::Spec->devnull; my @path = File::Spec->splitdir($FindBin::Bin); while ( @path && !is_dist_root(@path) ) { pop @path; } unless (@path) { die "Unable to find dist root\n"; } chdir File::Spec->catdir(@path); # exit test directory # override where cpanm puts its log file $ENV{'HOME'} = $tmphome->dirname; system 'perl', $cpanm_path, '--notest', '--installdeps', '-L', $tmpdir->dirname, '.'; if ($?) { exit( $? >> 8 ); } # We use system here instead of exec so that $tmpdir gets cleaned up # after cpanm finishes system 'perl', $cpanm_path, '-L', $tmpdir->dirname, '.'; exit( $? >> 8 ); } Plugin000755000765000024 012637665701 23211 5ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/lib/Dist/ZillaRequiresExternal.pm100644000765000024 2076312637665701 27241 0ustar00mjgstaff000000000000Dist-Zilla-Plugin-RequiresExternal-1.006/lib/Dist/Zilla/Pluginpackage Dist::Zilla::Plugin::RequiresExternal; # ABSTRACT: make dists require external commands use Modern::Perl '2010'; ## no critic (Modules::ProhibitUseQuotedVersion) our $VERSION = '1.006'; # VERSION use utf8; #pod =for test_synopsis #pod BEGIN { die "SKIP: this is ini, not perl\n"; } #pod #pod =head1 SYNOPSIS #pod #pod In your F: #pod #pod [RequiresExternal] #pod requires = /path/to/some/executable #pod requires = executable_in_path #pod #pod =head1 DESCRIPTION #pod #pod This L plugin creates a test in your distribution #pod to check for the existence of executable commands you require. #pod #pod =head1 SEE ALSO #pod #pod This module was indirectly inspired by #pod L #pod command. #pod #pod =cut use Moose; use MooseX::Types::Moose qw(ArrayRef Bool Maybe Str); use MooseX::AttributeShortcuts; use Dist::Zilla::File::InMemory; use List::MoreUtils 'part'; use Path::Class; use namespace::autoclean; with qw( Dist::Zilla::Role::Plugin Dist::Zilla::Role::FileGatherer Dist::Zilla::Role::MetaProvider Dist::Zilla::Role::TextTemplate ); #pod =for Pod::Coverage mvp_multivalue_args #pod #pod =cut sub mvp_multivalue_args { return 'requires' } #pod =attr requires #pod #pod Each C attribute should be either an absolute path to an executable #pod or the name of a command in the user's C environment. Multiple #pod C lines are allowed. #pod #pod Example from a F file: #pod #pod [RequiresExternal] #pod requires = sqlplus #pod requires = /usr/bin/java #pod #pod This will require the program C to be available somewhere in the #pod user's C and the program C specifically in F. #pod #pod =cut has _requires => ( is => 'lazy', isa => Maybe [ ArrayRef [Str] ], init_arg => 'requires', default => sub { [] }, ); #pod =attr fatal #pod #pod Boolean value to determine if a failed test will immediately stop testing. #pod It also causes the test name to change to F so that #pod it runs earlier. #pod Defaults to false. #pod #pod =cut has fatal => ( is => 'ro', required => 1, isa => Maybe [Bool], default => 0 ); #pod =method gather_files #pod #pod Adds a F test script to your distribution that checks #pod if each L item is executable. #pod #pod =cut sub gather_files { my $self = shift; # @{$requires[0]} will contain any non-absolute paths to look for in $PATH # @{$requires[1]} will contain any absolute paths my @requires = part { file($_)->is_absolute() } @{ $self->_requires }; my $template = <<'END_TEMPLATE'; #!/usr/bin/env perl use Test::Most; plan tests => {{ $OUT = 0; $OUT += @{ $requires[0] } if defined $requires[0]; $OUT += @{ $requires[1] } if defined $requires[1]; }}; bail_on_fail if {{ $fatal }}; use Env::Path 0.18 'PATH'; {{ "ok(scalar PATH->Whence(\$_), \"\$_ in PATH\") for qw(@{ $requires[0] });" if defined $requires[0]; }} {{ "ok(-x \$_, \"\$_ is executable\") for qw(@{ $requires[1] });" if defined $requires[1]; }} END_TEMPLATE $self->add_file( Dist::Zilla::File::InMemory->new( name => ( $self->fatal ? 't/000-requires_external.t' : 't/requires_external.t', ), content => $self->fill_in_string( $template, { fatal => $self->fatal, requires => \@requires }, ), ), ); return; } #pod =method metadata #pod #pod Using this plugin will add L and L #pod to your distribution's testing prerequisites since the generated script uses #pod those modules. #pod #pod =cut sub metadata { return { prereqs => { test => { requires => { 'Test::Most' => '0', 'Env::Path' => '0.18' }, }, }, }; } __PACKAGE__->meta->make_immutable(); no Moose; 1; __END__ =pod =encoding utf8 =for :stopwords Mark Gardner GSI Commerce cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 NAME Dist::Zilla::Plugin::RequiresExternal - make dists require external commands =head1 VERSION version 1.006 =head1 SYNOPSIS In your F: [RequiresExternal] requires = /path/to/some/executable requires = executable_in_path =head1 DESCRIPTION This L plugin creates a test in your distribution to check for the existence of executable commands you require. =head1 ATTRIBUTES =head2 requires Each C attribute should be either an absolute path to an executable or the name of a command in the user's C environment. Multiple C lines are allowed. Example from a F file: [RequiresExternal] requires = sqlplus requires = /usr/bin/java This will require the program C to be available somewhere in the user's C and the program C specifically in F. =head2 fatal Boolean value to determine if a failed test will immediately stop testing. It also causes the test name to change to F so that it runs earlier. Defaults to false. =head1 METHODS =head2 gather_files Adds a F test script to your distribution that checks if each L item is executable. =head2 metadata Using this plugin will add L and L to your distribution's testing prerequisites since the generated script uses those modules. =for test_synopsis BEGIN { die "SKIP: this is ini, not perl\n"; } =head1 SEE ALSO This module was indirectly inspired by L command. =for Pod::Coverage mvp_multivalue_args =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc Dist::Zilla::Plugin::RequiresExternal =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone git://github.com/mjgardner/Dist-Zilla-Plugin-RequiresExternal.git =head1 AUTHOR Mark Gardner =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2015 by GSI Commerce. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut