CPANPLUS-Dist-Build-0.88/000755 001751 001751 00000000000 13106071257 015444 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/README000644 001751 001751 00000011346 13106071257 016331 0ustar00bingosbingos000000 000000 NAME CPANPLUS::Dist::Build - CPANPLUS plugin to install packages that use Build.PL VERSION version 0.88 SYNOPSIS my $build = CPANPLUS::Dist->new( format => 'CPANPLUS::Dist::Build', module => $modobj, ); $build->prepare; # runs Build.PL $build->create; # runs build && build test $build->install; # runs build install DESCRIPTION CPANPLUS::Dist::Build is a distribution class for Module::Build related modules. Using this package, you can create, install and uninstall perl modules. It inherits from CPANPLUS::Dist. Normal users won't have to worry about the interface to this module, as it functions transparently as a plug-in to CPANPLUS and will just Do The Right Thing when it's loaded. ACCESSORS parent() Returns the CPANPLUS::Module object that parented this object. status() Returns the Object::Accessor object that keeps the status for this module. STATUS ACCESSORS All accessors can be accessed as follows: $build->status->ACCESSOR build_pl () Location of the Build file. Set to 0 explicitly if something went wrong. build () BOOL indicating if the Build command was successful. test () BOOL indicating if the Build test command was successful. prepared () BOOL indicating if the prepare call exited successfully This gets set after perl Build.PL distdir () Full path to the directory in which the prepare call took place, set after a call to prepare. created () BOOL indicating if the create call exited successfully. This gets set after Build and Build test. installed () BOOL indicating if the module was installed. This gets set after Build install exits successfully. uninstalled () BOOL indicating if the module was uninstalled properly. _create_args () Storage of the arguments passed to create for this object. Used for recursive calls when satisfying prerequisites. _install_args () Storage of the arguments passed to install for this object. Used for recursive calls when satisfying prerequisites. METHODS $bool = CPANPLUS::Dist::Build->format_available(); Returns a boolean indicating whether or not you can use this package to create and install modules in your environment. $bool = $dist->init(); Sets up the CPANPLUS::Dist::Build object for use. Effectively creates all the needed status accessors. Called automatically whenever you create a new CPANPLUS::Dist object. $bool = $dist->prepare([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', force => BOOL, verbose => BOOL]) prepare prepares a distribution, running Build.PL and establishing any prerequisites this distribution has. The variable PERL5_CPANPLUS_IS_EXECUTING will be set to the full path of the Build.PL that is being executed. This enables any code inside the Build.PL to know that it is being installed via CPANPLUS. After a successful prepare you may call create to create the distribution, followed by install to actually install it. Returns true on success and false on failure. $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest => BOOL]) create preps a distribution for installation. This means it will run Build and Build test. This will also satisfy any prerequisites the module may have. If you set skiptest to true, it will skip the Build test stage. If you set force to true, it will go over all the stages of the Build process again, ignoring any previously cached results. It will also ignore a bad return value from Build test and still allow the operation to return true. Returns true on success and false on failure. You may then call $dist->install on the object to actually install it. $dist->install([verbose => BOOL, perl => /path/to/perl]) Actually installs the created dist. Returns true on success and false on failure. PROMINENCE Originally by Jos Boumans . Brought to working condition by Ken Williams . Other hackery and currently maintained by Chris BinGOs Williams ( no relation ). . AUTHOR Jos Boumans , Ken Williams COPYRIGHT AND LICENSE This software is copyright (c) 2017 by Jos Boumans, Ken Williams, Chris Williams and David Golden. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. CPANPLUS-Dist-Build-0.88/LICENSE000644 001751 001751 00000044067 13106071257 016464 0ustar00bingosbingos000000 000000 This software is copyright (c) 2017 by Jos Boumans, Ken Williams, Chris Williams and David Golden. 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) 2017 by Jos Boumans, Ken Williams, Chris Williams and David Golden. 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) 2017 by Jos Boumans, Ken Williams, Chris Williams and David Golden. 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 CPANPLUS-Dist-Build-0.88/Changes000644 001751 001751 00000020455 13106071257 016745 0ustar00bingosbingos000000 000000 ================================================== Changes from 2012-05-15 00:00:00 +0000 to present. ================================================== ----------------------------------------- version 0.88 at 2017-05-14 15:07:07 +0000 ----------------------------------------- Change: ab61a30e44ed79305fa76c04e246c469027ccd02 Author: Chris 'BinGOs' Williams Date : 2017-05-14 16:07:07 +0000 Release engineering for 0.88 Change: b54a2cf8f0505fa734f2a169ac56943326ecf861 Author: Chris Williams Date : 2017-05-14 15:55:52 +0000 Implement x_use_unsafe_inc meta behaviour RT#121656 (#2) Use stashed META.[yml|json] data and use it to determine whether to set PERL_USE_UNSAFE_INC environment variable. If PERL_USE_UNSAFE_INC is already set in the environment then x_use_unsafe_inc is ignored. Change: c241454c6a2a7e469e0a5fb39ff7b1bf3f8d323c Author: Chris 'BinGOs' Williams Date : 2017-05-14 14:06:07 +0000 Move prepare PERL_USE_UNSAFE_INC setter ----------------------------------------- version 0.86 at 2017-04-12 11:32:06 +0000 ----------------------------------------- Change: 62e668ec919f17101486d83ff968e7cb9af198d0 Author: Chris 'BinGOs' Williams Date : 2017-04-12 12:32:06 +0000 Use Autoflush if CPANPLUS is a suitable version Also realised that the compilation tests weren't being run because M::B since 0.36 has always had C_support. Fixed that too. ----------------------------------------- version 0.84 at 2017-04-07 20:39:25 +0000 ----------------------------------------- Change: ca0adc5f8b84ddb1992c2aecdcfdfff56db4018d Author: Chris 'BinGOs' Williams Date : 2017-04-07 21:39:25 +0000 Switch dist to Dist::Zilla ----------------------------------------- version 0.82 at 2017-02-16 12:30:35 +0000 ----------------------------------------- Change: ac694271a5be511d3278c4af60ad97048523ba49 Author: Chris 'BinGOs' Williams Date : 2017-02-16 12:30:35 +0000 Release engineering for 0.82 Change: 64dbc5c083c6a07bb9402daaf135893f0b3f1f0f Author: Chris 'BinGOs' Williams Date : 2017-02-13 14:03:16 +0000 Set env var PERL_USE_UNSAFE_INC if required [rt.cpan.org #120227] ----------------------------------------- version 0.80 at 2016-06-05 12:46:14 +0000 ----------------------------------------- Change: e8ad0a7ebfb3bfcb59912ec06525257a1353498d Author: Chris 'BinGOs' Williams Date : 2016-06-05 13:46:14 +0000 Include test_requires when falling back on old shizz ----------------------------------------- version 0.78 at 2014-06-11 17:08:00 +0000 ----------------------------------------- Change: a0a9bb963612d388f910ffee7515f9597c87a749 Author: Chris 'BinGOs' Williams Date : 2014-06-11 18:08:00 +0000 Shield tests from PERL_INSTALL_QUIET env var ----------------------------------------- version 0.76 at 2014-01-08 08:47:19 +0000 ----------------------------------------- Change: 5d7aa070927e2417cabf5ccbd94ae99ffa4a3e49 Author: Chris 'BinGOs' Williams Date : 2014-01-08 08:47:19 +0000 Release engineering for 0.76 Change: f52daeda1e36f88f4e2bf47da821d421f2c1776e Author: Chris 'BinGOs' Williams Date : 2014-01-08 08:45:33 +0000 Don't send test reports during prepare() phase ----------------------------------------- version 0.74 at 2013-08-06 19:53:37 +0000 ----------------------------------------- Change: 1d05112a458c2bd82c36b2110c4573cdbae9990e Author: Chris 'BinGOs' Williams Date : 2013-08-06 20:53:37 +0000 Remove Module::Pluggable prereq Change: 14dcae8692cfd2072fde47449a67dbcbd44bafbf Author: Chris 'BinGOs' Williams Date : 2013-07-21 16:25:19 +0000 Update Changes and bump to version 0.72 Change: 6396a7bbc27321f1feb2194d968709b93cb127ae Author: Chris 'BinGOs' Williams Date : 2013-07-21 16:25:18 +0000 Actually resolve issue where Build.PL does not generate Build script Change: 0cb493116a1cd338207e6ebe461cb4d64269b4b5 Author: Chris Williams Date : 2013-05-20 11:30:38 +0000 Merge pull request #1 from dsteinbrunner/patch-1 typo fix Change: 275b48eb1a0608a120922d7d152bf8d0d2915e28 Author: David Steinbrunner Date : 2013-05-19 13:09:10 +0000 typo fix ----------------------------------------- version 0.72 at 2013-07-21 15:22:42 +0000 ----------------------------------------- Change: 49afc65c472f51cd53c4f9d86693923a02ce38d4 Author: Chris 'BinGOs' Williams Date : 2013-07-21 16:22:42 +0000 Update Changes and bump to version 0.72 Change: 85ec1923b10a98bda4737dc51c6adf7565ab543f Author: Chris 'BinGOs' Williams Date : 2013-07-21 16:20:53 +0000 Actually resolve issue where Build.PL does not generate Build script Change: 8035fa59594f897c99a74c767e5f38a0546d7bcd Author: Chris 'BinGOs' Williams Date : 2013-03-31 12:18:24 +0000 svn.perl.org is being retired. Switch over to git and github. ----------------------------------------- version 0.70 at 2013-01-25 16:09:36 +0000 ----------------------------------------- Change: 651cebdfb842548594bc5b18d28da5f479c99de3 Author: BINGOS Date : 2013-01-25 16:09:36 +0000 CPAN release 0.70 git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/tags/0.70@15567 50811bd7-b8ce-0310-adc1-d9db26280581 Change: 40e0ac09bb4f7152edf64f697c9cc02e088aadbc Author: Chris Williams Date : 2013-01-25 16:03:17 +0000 Core deprecation warnings added, prior to de-coring with v5.20.0 git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/trunk@15566 50811bd7-b8ce-0310-adc1-d9db26280581 ----------------------------------------- version 0.68 at 2012-12-05 00:19:04 +0000 ----------------------------------------- Change: b1941dee38917a0e1174830a50707996a173aa9e Author: BINGOS Date : 2012-12-05 00:19:04 +0000 CPAN release 0.68 git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/tags/0.68@15496 50811bd7-b8ce-0310-adc1-d9db26280581 Change: 89300ed43246d33eb33885d089cc162cf6770c8d Author: Chris Williams Date : 2012-12-05 00:18:30 +0000 Revert change to wrapper command-line git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/trunk@15495 50811bd7-b8ce-0310-adc1-d9db26280581 ----------------------------------------- version 0.66 at 2012-12-04 23:12:59 +0000 ----------------------------------------- Change: 12975d87a8d5438130c682fe57a0b04fb3093303 Author: BINGOS Date : 2012-12-04 23:12:59 +0000 CPAN release 0.66 git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/tags/0.66@15494 50811bd7-b8ce-0310-adc1-d9db26280581 Change: 99eb62806d6ff5e0d2ea9e7e15546fe961282fdd Author: Chris Williams Date : 2012-12-04 23:10:45 +0000 Resolve issue where Build.PL does not generate Build script git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/trunk@15493 50811bd7-b8ce-0310-adc1-d9db26280581 ----------------------------------------- version 0.64 at 2012-10-20 22:28:51 +0000 ----------------------------------------- Change: 6cdee172f685bd9a55f842b407febb005cdce644 Author: BINGOS Date : 2012-10-20 22:28:51 +0000 CPAN release 0.64 git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/tags/0.64@15446 50811bd7-b8ce-0310-adc1-d9db26280581 Change: 5c42eccaa68b574298b3b3a52b15d9ee957e7d8f Author: Chris Williams Date : 2012-10-20 22:27:00 +0000 Update Module::Install, no functional changes. git-svn-id: https://svn.perl.org/modules/CPANPLUS-Dist-Build/trunk@15445 50811bd7-b8ce-0310-adc1-d9db26280581 ================================================= Plus 27 releases after 2012-05-15 00:00:00 +0000. ================================================= CPANPLUS-Dist-Build-0.88/dist.ini000644 001751 001751 00000001326 13106071257 017112 0ustar00bingosbingos000000 000000 name = CPANPLUS-Dist-Build version = 0.88 author = Jos Boumans , Ken Williams license = Perl_5 copyright_holder = Jos Boumans, Ken Williams, Chris Williams and David Golden [@BINGOS] -remove = MakeMaker [MakeMaker::Awesome] WriteMakefile_arg = INSTALLDIRS => ( $] >= 5.009005 && $] < 5.012 ? 'perl' : 'site' ) WriteMakefile_arg = clean => {FILES => 't/dummy-cpanplus t/dummy-perl/lib/perl5'} [Prereqs / TestRequires] Test::More = 0.47 [Prereqs] CPANPLUS = 0.84 ExtUtils::Install = 1.42 File::Spec = 0 IPC::Cmd = 0.42 Locale::Maketext::Simple = 0 Module::Build = 0.32 Module::Load = 0.16 Module::Load::Conditional = 0.30 Params::Check = 0.26 Test::Harness = 3.16 if = 0 perl = 5.006 CPANPLUS-Dist-Build-0.88/META.yml000644 001751 001751 00000001752 13106071257 016722 0ustar00bingosbingos000000 000000 --- abstract: 'CPANPLUS plugin to install packages that use Build.PL' author: - 'Jos Boumans , Ken Williams ' build_requires: File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Test::More: '0.47' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: CPANPLUS-Dist-Build requires: CPANPLUS: '0.84' ExtUtils::Install: '1.42' File::Spec: '0' IPC::Cmd: '0.42' Locale::Maketext::Simple: '0' Module::Build: '0.32' Module::Load: '0.16' Module::Load::Conditional: '0.30' Params::Check: '0.26' Test::Harness: '3.16' if: '0' perl: '5.006' resources: homepage: https://github.com/bingos/cpanplus-dist-build repository: https://github.com/bingos/cpanplus-dist-build.git version: '0.88' x_serialization_backend: 'YAML::Tiny version 1.70' CPANPLUS-Dist-Build-0.88/MANIFEST000644 001751 001751 00000001047 13106071257 016577 0ustar00bingosbingos000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.009. Changes Changes.old LICENSE MANIFEST META.json META.yml Makefile.PL README dist.ini lib/CPANPLUS/Dist/Build.pm lib/CPANPLUS/Dist/Build/Constants.pm t/00-compile.t t/01_CPANPLUS-Dist-Build-Constants.t t/02_CPANPLUS-Dist-Build.t t/author-pod-coverage.t t/author-pod-syntax.t t/dummy-CPAN/authors/01mailrc.txt.gz t/dummy-CPAN/modules/02packages.details.txt.gz t/dummy-CPAN/modules/03modlist.data.gz t/inc/conf.pl t/src/noxs/Foo-Bar-0.01.tar.gz t/src/xs/Foo-Bar-0.01.tar.gz CPANPLUS-Dist-Build-0.88/META.json000644 001751 001751 00000003534 13106071257 017072 0ustar00bingosbingos000000 000000 { "abstract" : "CPANPLUS plugin to install packages that use Build.PL", "author" : [ "Jos Boumans , Ken Williams " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "CPANPLUS-Dist-Build", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "CPANPLUS" : "0.84", "ExtUtils::Install" : "1.42", "File::Spec" : "0", "IPC::Cmd" : "0.42", "Locale::Maketext::Simple" : "0", "Module::Build" : "0.32", "Module::Load" : "0.16", "Module::Load::Conditional" : "0.30", "Params::Check" : "0.26", "Test::Harness" : "3.16", "if" : "0", "perl" : "5.006" } }, "test" : { "requires" : { "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::More" : "0.47" } } }, "release_status" : "stable", "resources" : { "homepage" : "https://github.com/bingos/cpanplus-dist-build", "repository" : { "type" : "git", "url" : "https://github.com/bingos/cpanplus-dist-build.git", "web" : "https://github.com/bingos/cpanplus-dist-build" } }, "version" : "0.88", "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233" } CPANPLUS-Dist-Build-0.88/Changes.old000644 001751 001751 00000017073 13106071257 017524 0ustar00bingosbingos000000 000000 Revision history for Perl extension CPANPLUS::Dist::Build. 0.82 Thu Feb 16 12:29:37 GMT 2017 - Set env var PERL_USE_UNSAFE_INC if required [rt.cpan.org #120227] 0.80 Sun Jun 5 13:43:55 BST 2016 - Include test_requires when falling back to older mechanism for determining prereqs 0.78 Wed Jun 11 18:06:59 BST 2014 - Shield tests from PERL_INSTALL_QUIET env var 0.76 Wed Jan 8 08:46:22 GMT 2014 - Don't send test reports during prepare() phase 0.74 Tue Aug 6 20:53:04 BST 2013 - Remove Module::Pluggable prereq 0.72 Sun Jul 21 16:21:40 BST 2013 - Actually resolve the issue where Build.PL doesn't generate a Build script. Regression since 0.68 0.70 Fri Jan 25 15:58:27 GMT 2013 - Add deprecation usage to warn if modules are loaded from corelib. CPANPLUS::Dist::Build will be leaving core with v5.20.0 and will still be available on CPAN. 0.68 Wed Dec 5 00:17:04 GMT 2012 - Revert change to wrapper command-line 0.66 Tue Dec 4 23:05:53 GMT 2012 - Resolve an issue where Build.PL doesn't generate a Build script 0.64 Sat Oct 20 23:21:36 BST 2012 - Update Module::Install, no functional changes. 0.62 Mon Feb 13 22:15:57 GMT 2012 - Test reporting enhancements 0.60 Thu Oct 27 20:54:22 BST 2011 - Eliminate the need to use 'perlwrapper' at all by using an equivalent one-liner. 0.58 Sun Sep 4 20:42:48 BST 2011 - Added local::lib type behaviour detection to disable use of 'sudo' 0.56 Tue Apr 19 14:51:07 BST 2011 - Display failing tests only once to terminal. 0.54 Mon Feb 28 11:52:04 GMT 2011 - Only skip 'perl' as a prereq when CPANPLUS version is less than 0.9102 0.52 Fri Jan 7 22:23:03 GMT 2011 - Apply blead patch from Peter Acklam 0.50 Thu Oct 28 23:02:19 BST 2010 - We clear the relevant env vars that effect Module::Build during the 'install' test. local::lib and cpanm set these. 0.48 Sun Sep 5 15:14:17 BST 2010 - Explicitly set the location of cpanp-run-perl when under PERL_CORE in t/inc/conf.pl - Make sure we find cpanp-run-perl in ../../utils when PERL_CORE - Correct spelling in POD, pointed out by H.Merijn Brand 0.46 Sat Jan 23 07:52:19 GMT 2010 - actually make the prereq resolving fallback to _build/ querying if the 'prereq_data' action fails. *facepalm* 0.44 Wed Nov 18 12:37:03 GMT 2009 - Make the prereq resolving fallback to _build/ querying if the 'prereq_data' action fails. Spotted by Johan Vromans. 0.41_01 Thu Nov 5 14:07:48 GMT 2009 - Added MYMETA support 0.40 Mon Sep 7 14:15:03 BST 2009 - Change the location of the CPANPLUS bin directory when running under core (bingos) 0.38 Mon Aug 24 13:59:11 BST 2009 - Cosmetic change to the test output message so it matches CPANPLUS::Dist::MM (bingos) 0.36 Sat Jul 4 14:51:42 BST 2009 - Make install() honour the buildflags directive, absence spotted by Matt Trout 0.35_03 Tue Jun 30 22:48:57 BST 2009 - Switch to IPC::Cmd->can_capture_buffer wherever we need to rely on what is captured ( VMS and MSWin32 currently ). - Make sure to use perlwrapper for Build.PL on VMS 0.35_02 Sat Jun 27 09:35:55 BST 2009 - Don't use the perlwrapper on VMS, (Craig Berry) - Skip env test on VMS 0.35_01 Wed Jun 24 09:57:28 BST 2009 - Fix to _find_prereqs() for VMS when running prereq_data Build target, reported by Craig Berry. 0.34 Sat Jun 13 09:50:24 BST 2009 - Fixed the 02packages.details.txt.gz file in our fake CPAN CPANPLUS-0.87_01 now checks this file for sanity. Ours was not sane >:) Spotted by the ever vigilant Vincent Pit. 0.32 Mon Jun 1 21:43:52 BST 2009 - Removed generation of .output files - Fixed the setting of PERL5_CPANPLUS_IS_EXECUTING env var in prepare. Spotted by Matt Trout - Added 'perlwrapper' to all perl calls. Spotted by Matt Trout. 0.30 Mon May 18 16:23:14 BST 2009 - [RT #46176] Skip XS tests when perl compiled without dynamic loading. Reported by Andy Dougherty 0.28 Fri May 8 10:58:42 BST 2009 - Add the CPANPLUS bin/ dir to $ENV{PATH} if we are running under PERL_CORE. This fixes warnings during 'make test' in the core. No need for other users to upgrade. 0.26 Thu May 7 16:40:26 BST 2009 - Integrated the t/inc/conf.pl and dummy-CPAN/ structure from CPANPLUS into the testsuite. This resolves the issue where CPAN indexes were fetched and built during the tests. Spotted by Steve Hay, fixed with help from Jos Boumans. 0.24 Mon Apr 27 16:55:37 BST 2009 - Removed CPANPLUS::inc from the code as CPANPLUS-0.86 does not include this now. 0.22 Tue Apr 14 11:01:12 BST 2009 - Fix the installdirs in Makefile.PL 0.20 Tue Apr 7 17:01:47 BST 2009 - Made MI::Respository only necessary on the author-side we should be installable on 5.6.* now. No other changes so no need to update in core. 0.18 Mon Mar 30 10:03:21 BST 2009 - Amendments for the new save_state in dev CPANPLUS. - Added M::I::Repository functionality to Makefile.PL 0.16 Thu Mar 19 22:24:06 GMT 2009 - Applied patch from Vincent Pit [RT #44426] 'buildflags of the form "--option value" aren't honoured' 0.14 Tue Mar 10 22:56:24 GMT 2009 - Bump versions for a stable release 0.13_02 Mon Mar 9 13:36:15 GMT 2009 - Resolved some issues on MSWin32 due to capturing of STDOUT/STDERR 0.13_01 Sun Mar 8 13:32:01 GMT 2009 - Ported the 'configure_requires' functionality from CP::D::MM 0.12 Mon Mar 2 13:33:47 GMT 2009 - Fixed the version number in ::Constants 0.10 Mon Mar 2 07:36:41 GMT 2009 - Added 'installdirs' directive to Makefile.PL to resolve [rt #43739] (bingos) - Only a version change no need to update core. 0.08 Sat Feb 28 07:53:52 GMT 2009 - bumped Module::Build prerequisite to 0.32 (dagolden) - refactored documentation to reflect changes to code (bingos) - removed all refs to Module::Build object (bingos) - added LICENSE file (bingos) - added documentation to ::Constants (bingos) - added POD and POD coverage tests (bingos) 0.06_05 Wed Feb 25 22:24:50 GMT 2009 - Brought the test fixes into line with blead [rt #42670] - suppress [ERROR] messages in tests (dagolden) 0.06_04 Wed Feb 18 16:50:08 GMT 2009 - bumped CPANPLUS prerequisite to 0.84 (bingos) - bumped all required versions, added Test::Harness 3.15 (bingos) - Fixed warnings in tests and added diag() to ignore the [ERROR] (bingos) 0.06_03 Mon Feb 9 16:31:10 GMT 2009 - process separation for Build.PL, Build, test and install actions, using IPC::Cmd (bingos) - If M::B is version 0.31_03 or greater use 'Build prereq_data' to work out prereqs, otherwise fallback on poking around in _build/ like CPAN.pm does. (bingos) - Resolved issues with test reports for FAILs being misgraded as UKNOWN. (bingos) 0.06_02 - - Fixed some issues with test output not appearing in CPAN Tester reports. [Chris Williams] 0.06 - Fri May 4 14:11:36 2007 - Make test suite compatible with the perl core. No functional changes in this release; users need not upgrade. 0.05 - Sun Mar 11 16:58:13 2007 - Set $ENV{PERL5_CPANPLUS_IS_EXECUTING} to the full path of the Build.PL file when running Module::Build->new_from_context. Requested by Adam Kennedy . 0.04 Wed Aug 16 22:00:18 CDT 2006 - Address RT #13926: build_requires not included in prerequisites - Address RT #14240 Why does it say "Params::Check" in the README Description? - Address RT #13937 Won't install without force because newer version installed (from CPANPLUS 0.055?) - Update dependency versions in Makefile.PL - We were sending cpantesters 'pass' reports whenever --force was in effect, which is probably not the right thing to do. [Jos Boumans] CPANPLUS-Dist-Build-0.88/Makefile.PL000644 001751 001751 00000004055 13106071257 017422 0ustar00bingosbingos000000 000000 # This Makefile.PL for CPANPLUS-Dist-Build was generated by # Dist::Zilla::Plugin::MakeMaker::Awesome 0.38. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "CPANPLUS plugin to install packages that use Build.PL", "AUTHOR" => "Jos Boumans , Ken Williams ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "CPANPLUS-Dist-Build", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "CPANPLUS::Dist::Build", "PREREQ_PM" => { "CPANPLUS" => "0.84", "ExtUtils::Install" => "1.42", "File::Spec" => 0, "IPC::Cmd" => "0.42", "Locale::Maketext::Simple" => 0, "Module::Build" => "0.32", "Module::Load" => "0.16", "Module::Load::Conditional" => "0.30", "Params::Check" => "0.26", "Test::Harness" => "3.16", "if" => 0 }, "TEST_REQUIRES" => { "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => "0.47" }, "VERSION" => "0.88", "test" => { "TESTS" => "t/*.t" } ); %WriteMakefileArgs = ( %WriteMakefileArgs, INSTALLDIRS => ( $] >= 5.009005 && $] < 5.012 ? 'perl' : 'site' ), clean => {FILES => 't/dummy-cpanplus t/dummy-perl/lib/perl5'}, ); my %FallbackPrereqs = ( "CPANPLUS" => "0.84", "ExtUtils::Install" => "1.42", "File::Spec" => 0, "IO::Handle" => 0, "IPC::Cmd" => "0.42", "IPC::Open3" => 0, "Locale::Maketext::Simple" => 0, "Module::Build" => "0.32", "Module::Load" => "0.16", "Module::Load::Conditional" => "0.30", "Params::Check" => "0.26", "Test::Harness" => "3.16", "Test::More" => "0.47", "if" => 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); CPANPLUS-Dist-Build-0.88/t/000755 001751 001751 00000000000 13106071257 015707 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/lib/000755 001751 001751 00000000000 13106071257 016212 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/lib/CPANPLUS/000755 001751 001751 00000000000 13106071257 017437 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/lib/CPANPLUS/Dist/000755 001751 001751 00000000000 13106071257 020342 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/lib/CPANPLUS/Dist/Build.pm000644 001751 001751 00000073765 13106071257 021761 0ustar00bingosbingos000000 000000 package CPANPLUS::Dist::Build; $CPANPLUS::Dist::Build::VERSION = '0.88'; #ABSTRACT: CPANPLUS plugin to install packages that use Build.PL use if $] > 5.017, 'deprecate'; use strict; use warnings; use vars qw[@ISA $STATUS]; @ISA = qw[CPANPLUS::Dist]; use CPANPLUS::Internals::Constants; ### these constants were exported by CPANPLUS::Internals::Constants ### in previous versions.. they do the same though. If we want to have ### a normal 'use' here, up the dependency to CPANPLUS 0.056 or higher BEGIN { require CPANPLUS::Dist::Build::Constants; CPANPLUS::Dist::Build::Constants->import() if not __PACKAGE__->can('BUILD') && __PACKAGE__->can('BUILD_DIR'); } use CPANPLUS::Error; use Config; use FileHandle; use Cwd; use version; use IPC::Cmd qw[run]; use Params::Check qw[check]; use Module::Load::Conditional qw[can_load check_install]; use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; local $Params::Check::VERBOSE = 1; ### check if the format is available ### sub format_available { my $mod = 'Module::Build'; unless( can_load( modules => { $mod => '0.2611' }, nocache => 1 ) ) { error( loc( "You do not have '%1' -- '%2' not available", $mod, __PACKAGE__ ) ); return; } return 1; } sub init { my $dist = shift; my $status = $dist->status; $status->mk_accessors(qw[build_pl build test created installed uninstalled _create_args _install_args _prepare_args _mb_object _buildflags _metadata ]); ### just in case 'format_available' didn't get called require Module::Build; return 1; } sub prepare { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; $self->status->dist_cpan( $dist ) unless $self->status->dist_cpan; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } my $args; my( $force, $verbose, $buildflags, $perl, $prereq_target, $prereq_format, $prereq_build ); { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { force => { default => $conf->get_conf('force'), store => \$force }, verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, perl => { default => $^X, store => \$perl }, buildflags => { default => $conf->get_conf('buildflags'), store => \$buildflags }, prereq_target => { default => '', store => \$prereq_target }, prereq_format => { default => '', store => \$prereq_format }, prereq_build => { default => 0, store => \$prereq_build }, }; $args = check( $tmpl, \%hash ) or return; } return 1 if $dist->status->prepared && !$force; $dist->status->_prepare_args( $args ); ### chdir to work directory ### my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } ### by now we've loaded module::build, and we're using the API, so ### it's safe to remove CPANPLUS::inc from our inc path, especially ### because it can trip up tests run under taint (just like EU::MM). ### turn off our PERL5OPT so no modules from CPANPLUS::inc get ### included in make test -- it should build without. ### also, modules that run in taint mode break if we leave ### our code ref in perl5opt ### XXX we've removed the ENV settings from cp::inc, so only need ### to reset the @INC #local $ENV{PERL5OPT} = CPANPLUS::inc->original_perl5opt; #local $ENV{PERL5LIB} = CPANPLUS::inc->original_perl5lib; #local @INC = CPANPLUS::inc->original_inc; ### this will generate warnings under anything lower than M::B 0.2606 my @buildflags = $dist->_buildflags_as_list( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; my $prereq_fail; my $status = { }; RUN: { # 0.85_01 ### we resolve 'configure requires' here, so we can run the 'perl ### Makefile.PL' command ### XXX for tests: mock f_c_r to something that *can* resolve and ### something that *doesn't* resolve. Check the error log for ok ### on this step or failure ### XXX make a separate tarball to test for this scenario: simply ### containing a makefile.pl/build.pl for test purposes? my $safe_ver = version->new('0.85_01'); if ( version->new($CPANPLUS::Internals::VERSION) >= $safe_ver ) { my $configure_requires = $dist->find_configure_requires; my $ok = $dist->_resolve_prereqs( format => $prereq_format, verbose => $verbose, prereqs => $configure_requires, target => $prereq_target, force => $force, prereq_build => $prereq_build, ); unless( $ok ) { #### use $dist->flush to reset the cache ### error( loc( "Unable to satisfy '%1' for '%2' " . "-- aborting install", 'configure_requires', $self->module ) ); $dist->status->prepared(0); $prereq_fail++; $fail++; last RUN; } ### end of prereq resolving ### } # Wrap the exception that may be thrown here (should likely be # done at a much higher level). my $prep_output; my $metadata = $dist->status->_metadata; my $x_use_unsafe_inc = ( defined $metadata && exists $metadata->{x_use_unsafe_inc} ? $metadata->{x_use_unsafe_inc} : undef ); $x_use_unsafe_inc = 1 unless defined $x_use_unsafe_inc; local $ENV{PERL_USE_UNSAFE_INC} = $x_use_unsafe_inc unless exists $ENV{PERL_USE_UNSAFE_INC}; my $env = ENV_CPANPLUS_IS_EXECUTING; local $ENV{$env} = BUILD_PL->( $dir ); my @run_perl = $dist->_perlrun(); my $cmd = [$perl, @run_perl, BUILD_PL->($dir), @buildflags]; unless ( scalar run( command => $cmd, buffer => \$prep_output, verbose => $verbose ) ) { error( loc( "Build.PL failed: %1", $prep_output ) ); if ( $conf->get_conf('cpantest') ) { $status->{stage} = 'prepare'; $status->{capture} = $prep_output; } $fail++; last RUN; } unless ( -e BUILD->( $dir ) ) { error( loc( "Build.PL failed to generate a Build script: %1", $prep_output ) ); if ( $conf->get_conf('cpantest') ) { $status->{stage} = 'prepare'; $status->{capture} = $prep_output; } $fail++; last RUN; } msg( $prep_output, 0 ); my $prereqs = $self->status->prereqs; $prereqs ||= $dist->_find_prereqs( verbose => $verbose, dir => $dir, perl => $perl, buildflags => $buildflags ); } ### send out test report? ### ### there is no way to accurately know if it is a PASS/FAIL/ETC ### CPANPLUS::Dist::MM doesn't bother why are we? if( 0 and $fail and $conf->get_conf('cpantest') and not $prereq_fail ) { $cb->_send_report( module => $self, failed => $fail, buffer => CPANPLUS::Error->stack_as_string, status => $status, verbose => $verbose, force => $force, ) or error(loc("Failed to send test report for '%1'", $self->module ) ); } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir back to start dir '%1'", $orig ) ); } ### save where we wrote this stuff -- same as extract dir in normal ### installer circumstances $dist->status->distdir( $self->status->extract ); return $dist->status->prepared( $fail ? 0 : 1 ); } sub _find_prereqs { my $dist = shift; my $self = $dist->parent; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my ($verbose, $dir, $buildflags, $perl); my $tmpl = { verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, dir => { default => $self->status->extract, store => \$dir }, perl => { default => $^X, store => \$perl }, buildflags => { default => $conf->get_conf('buildflags'), store => \$buildflags }, }; my $args = check( $tmpl, \%hash ) or return; my $prereqs = {}; $prereqs = $dist->find_mymeta_requires() if $dist->can('find_mymeta_requires'); if ( keys %$prereqs ) { # Ugly hack } else { my $safe_ver = version->new('0.31_03'); my $content; PREREQS: { if ( version->new( $Module::Build::VERSION ) >= $safe_ver and IPC::Cmd->can_capture_buffer ) { my @buildflags = $dist->_buildflags_as_list( $buildflags ); # Use the new Build action 'prereq_data' my @run_perl = $dist->_perlrun(); unless ( scalar run( command => [$perl, @run_perl, BUILD->($dir), 'prereq_data', @buildflags], buffer => \$content, verbose => 0 ) ) { error( loc( "Build 'prereq_data' failed: %1 %2", $!, $content ) ); #return; } else { last PREREQS; } } my $file = File::Spec->catfile( $dir, '_build', 'prereqs' ); return unless -f $file; my $fh = FileHandle->new(); unless( $fh->open( $file ) ) { error( loc( "Cannot open '%1': %2", $file, $! ) ); return; } $content = do { local $/; <$fh> }; } return unless $content; my $bphash = eval $content; return unless $bphash and ref $bphash eq 'HASH'; foreach my $type ('requires', 'build_requires', 'test_requires') { next unless $bphash->{$type} and ref $bphash->{$type} eq 'HASH'; $prereqs->{$_} = $bphash->{$type}->{$_} for keys %{ $bphash->{$type} }; } } { delete $prereqs->{'perl'} unless version->new($CPANPLUS::Internals::VERSION) >= version->new('0.9102'); } ### allows for a user defined callback to filter the prerequisite ### list as they see fit, to remove (or add) any prereqs they see ### fit. The default installed callback will return the hashref in ### an unmodified form ### this callback got added after cpanplus 0.0562, so use a 'can' ### to find out if it's supported. For older versions, we'll just ### return the hashref as is ourselves. my $href = $cb->_callbacks->can('filter_prereqs') ? $cb->_callbacks->filter_prereqs->( $cb, $prereqs ) : $prereqs; $self->status->prereqs( $href ); ### make sure it's not the same ref return { %$href }; } sub create { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; $self->status->dist_cpan( $dist ) unless $self->status->dist_cpan; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } my $args; my( $force, $verbose, $buildflags, $skiptest, $prereq_target, $perl, $prereq_format, $prereq_build); { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { force => { default => $conf->get_conf('force'), store => \$force }, verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, perl => { default => $^X, store => \$perl }, buildflags => { default => $conf->get_conf('buildflags'), store => \$buildflags }, skiptest => { default => $conf->get_conf('skiptest'), store => \$skiptest }, prereq_target => { default => '', store => \$prereq_target }, ### don't set the default format to 'build' -- that is wrong! prereq_format => { #default => $self->status->installer_type, default => '', store => \$prereq_format }, prereq_build => { default => 0, store => \$prereq_build }, }; $args = check( $tmpl, \%hash ) or return; } # restore the state as we have created this already. if ( $dist->status->created && !$force ) { ### add this directory to your lib ### $self->add_to_includepath(); return 1; } $dist->status->_create_args( $args ); ### is this dist prepared? unless( $dist->status->prepared ) { error( loc( "You have not successfully prepared a '%2' distribution ". "yet -- cannot create yet", __PACKAGE__ ) ); return; } ### chdir to work directory ### my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } ### by now we've loaded module::build, and we're using the API, so ### it's safe to remove CPANPLUS::inc from our inc path, especially ### because it can trip up tests run under taint (just like EU::MM). ### turn off our PERL5OPT so no modules from CPANPLUS::inc get ### included in make test -- it should build without. ### also, modules that run in taint mode break if we leave ### our code ref in perl5opt ### XXX we've removed the ENV settings from cp::inc, so only need ### to reset the @INC #local $ENV{PERL5OPT} = CPANPLUS::inc->original_perl5opt; #local $ENV{PERL5LIB} = CPANPLUS::inc->original_perl5lib; #local @INC = CPANPLUS::inc->original_inc; ### but do it *before* the new_from_context, as M::B seems ### to be actually running the file... ### an unshift in the block seems to be ignored.. somehow... #{ my $lib = $self->best_path_to_module_build; # unshift @INC, $lib if $lib; #} unshift @INC, $self->best_path_to_module_build if $self->best_path_to_module_build; ### this will generate warnings under anything lower than M::B 0.2606 my @buildflags = $dist->_buildflags_as_list( $buildflags ); $dist->status->_buildflags( $buildflags ); my $fail; my $prereq_fail; my $test_fail; my $status = { }; RUN: { my @run_perl = $dist->_perlrun(); ### this will set the directory back to the start ### dir, so we must chdir /again/ my $ok = $dist->_resolve_prereqs( force => $force, format => $prereq_format, verbose => $verbose, prereqs => $self->status->prereqs, target => $prereq_target, prereq_build => $prereq_build, ); my $metadata = $dist->status->_metadata; my $x_use_unsafe_inc = ( defined $metadata && exists $metadata->{x_use_unsafe_inc} ? $metadata->{x_use_unsafe_inc} : undef ); $x_use_unsafe_inc = 1 unless defined $x_use_unsafe_inc; local $ENV{PERL_USE_UNSAFE_INC} = $x_use_unsafe_inc unless exists $ENV{PERL_USE_UNSAFE_INC}; unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } unless( $ok ) { #### use $dist->flush to reset the cache ### error( loc( "Unable to satisfy prerequisites for '%1' " . "-- aborting install", $self->module ) ); $dist->status->build(0); $fail++; $prereq_fail++; last RUN; } my ($captured, $cmd); if ( ON_VMS ) { $cmd = [$perl, BUILD->($dir), @buildflags]; } else { $cmd = [$perl, @run_perl, BUILD->($dir), @buildflags]; } unless ( scalar run( command => $cmd, buffer => \$captured, verbose => $verbose ) ) { error( loc( "MAKE failed:\n%1", $captured ) ); $dist->status->build(0); if ( $conf->get_conf('cpantest') ) { $status->{stage} = 'build'; $status->{capture} = $captured; } $fail++; last RUN; } msg( $captured, 0 ); $dist->status->build(1); ### add this directory to your lib ### $self->add_to_includepath(); ### this buffer will not include what tests failed due to a ### M::B/Test::Harness bug. Reported as #9793 with patch ### against 0.2607 on 26/1/2005 unless( $skiptest ) { my $test_output; if ( ON_VMS ) { $cmd = [$perl, BUILD->($dir), "test", @buildflags]; } else { $cmd = [$perl, @run_perl, BUILD->($dir), "test", @buildflags]; } local $ENV{PERL_INSTALL_QUIET}; unless ( scalar run( command => $cmd, buffer => \$test_output, verbose => $verbose ) ) { error( loc( "MAKE TEST failed:\n%1 ", $test_output ), ( $verbose ? 0 : 1 ) ); ### mark specifically *test* failure.. so we don't ### send success on force... $test_fail++; if( !$force and !$cb->_callbacks->proceed_on_test_failure->( $self, $@ ) ) { $dist->status->test(0); if ( $conf->get_conf('cpantest') ) { $status->{stage} = 'test'; $status->{capture} = $test_output; } $fail++; last RUN; } } else { msg( loc( "MAKE TEST passed:\n%1", $test_output ), 0 ); $dist->status->test(1); if ( $conf->get_conf('cpantest') ) { $status->{stage} = 'test'; $status->{capture} = $test_output; } } } else { msg(loc("Tests skipped"), $verbose); } } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir back to start dir '%1'", $orig ) ); } ### send out test report? ### if( $conf->get_conf('cpantest') and not $prereq_fail ) { $cb->_send_report( module => $self, failed => $test_fail || $fail, buffer => CPANPLUS::Error->stack_as_string, status => $status, verbose => $verbose, force => $force, tests_skipped => $skiptest, ) or error(loc("Failed to send test report for '%1'", $self->module ) ); } return $dist->status->created( $fail ? 0 : 1 ); } sub install { ### just in case you already did a create call for this module object ### just via a different dist object my $dist = shift; my $self = $dist->parent; ### we're also the cpan_dist, since we don't need to have anything ### prepared from another installer $dist = $self->status->dist_cpan if $self->status->dist_cpan; my $cb = $self->parent; my $conf = $cb->configure_object; my %hash = @_; my $verbose; my $perl; my $force; my $buildflags; { local $Params::Check::ALLOW_UNKNOWN = 1; my $tmpl = { verbose => { default => $conf->get_conf('verbose'), store => \$verbose }, force => { default => $conf->get_conf('force'), store => \$force }, buildflags => { default => $conf->get_conf('buildflags'), store => \$buildflags }, perl => { default => $^X, store => \$perl }, }; my $args = check( $tmpl, \%hash ) or return; $dist->status->_install_args( $args ); } my $dir; unless( $dir = $self->status->extract ) { error( loc( "No dir found to operate on!" ) ); return; } my $orig = cwd(); unless( $cb->_chdir( dir => $dir ) ) { error( loc( "Could not chdir to build directory '%1'", $dir ) ); return; } ### value set and false -- means failure ### if( defined $self->status->installed && !$self->status->installed && !$force ) { error( loc( "Module '%1' has failed to install before this session " . "-- aborting install", $self->module ) ); return; } my $fail; my @buildflags = $dist->_buildflags_as_list( $buildflags ); my @run_perl = $dist->_perlrun(); my $metadata = $dist->status->_metadata; my $x_use_unsafe_inc = ( defined $metadata && exists $metadata->{x_use_unsafe_inc} ? $metadata->{x_use_unsafe_inc} : undef ); $x_use_unsafe_inc = 1 unless defined $x_use_unsafe_inc; local $ENV{PERL_USE_UNSAFE_INC} = $x_use_unsafe_inc unless exists $ENV{PERL_USE_UNSAFE_INC}; ### hmm, how is this going to deal with sudo? ### for now, check effective uid, if it's not root, ### shell out, otherwise use the method if( $> ) { ### don't worry about loading the right version of M::B anymore ### the 'new_from_context' already added the 'right' path to ### M::B at the top of the build.pl my $cmd; if ( ON_VMS ) { $cmd = [$perl, BUILD->($dir), "install", @buildflags]; } else { $cmd = [$perl, @run_perl, BUILD->($dir), "install", @buildflags]; } ### Detect local::lib type behaviour. Do not use 'sudo' in these cases my $sudo = $conf->get_program('sudo'); SUDO: { ### Actual local::lib in use last SUDO if defined $ENV{PERL_MB_OPT} and $ENV{PERL_MB_OPT} =~ m!install_base!; ### 'buildflags' is configured with '--install_base' last SUDO if scalar grep { m!install_base! } @buildflags; ### oh well 'sudo make me a sandwich' unshift @$cmd, $sudo; } my $buffer; unless( scalar run( command => $cmd, buffer => \$buffer, verbose => $verbose ) ) { error(loc("Could not run '%1': %2", 'Build install', $buffer)); $fail++; } } else { my ($install_output, $cmd); if ( ON_VMS ) { $cmd = [$perl, BUILD->($dir), "install", @buildflags]; } else { $cmd = [$perl, @run_perl, BUILD->($dir), "install", @buildflags]; } unless( scalar run( command => $cmd, buffer => \$install_output, verbose => $verbose ) ) { error(loc("Could not run '%1': %2", 'Build install', $install_output)); $fail++; } else { msg( $install_output, 0 ); } } unless( $cb->_chdir( dir => $orig ) ) { error( loc( "Could not chdir back to start dir '%1'", $orig ) ); } return $dist->status->installed( $fail ? 0 : 1 ); } ### returns the string 'foo=bar --zot quux' ### as the list 'foo=bar', '--zot', 'qux' sub _buildflags_as_list { my $self = shift; my $flags = shift or return; return Module::Build->split_like_shell($flags); } { my $afe_ver = version->new($CPANPLUS::Internals::VERSION) >= version->new("0.9166"); sub _perlrun { my $self = shift; if ( $afe_ver ) { return ( '-MCPANPLUS::Internals::Utils::Autoflush' ); } else { return ( '-e', CPDB_PERL_WRAPPER ); } } } qq[Putting the Module::Build into CPANPLUS]; # Local variables: # c-indentation-style: bsd # c-basic-offset: 4 # indent-tabs-mode: nil # End: # vim: expandtab shiftwidth=4: __END__ =pod =encoding UTF-8 =head1 NAME CPANPLUS::Dist::Build - CPANPLUS plugin to install packages that use Build.PL =head1 VERSION version 0.88 =head1 SYNOPSIS my $build = CPANPLUS::Dist->new( format => 'CPANPLUS::Dist::Build', module => $modobj, ); $build->prepare; # runs Build.PL $build->create; # runs build && build test $build->install; # runs build install =head1 DESCRIPTION C is a distribution class for C related modules. Using this package, you can create, install and uninstall perl modules. It inherits from C. Normal users won't have to worry about the interface to this module, as it functions transparently as a plug-in to C and will just C when it's loaded. =head1 ACCESSORS =over 4 =item C Returns the C object that parented this object. =item C Returns the C object that keeps the status for this module. =back =head1 STATUS ACCESSORS All accessors can be accessed as follows: $build->status->ACCESSOR =over 4 =item C Location of the Build file. Set to 0 explicitly if something went wrong. =item C BOOL indicating if the C command was successful. =item C BOOL indicating if the C command was successful. =item C BOOL indicating if the C call exited successfully This gets set after C =item C Full path to the directory in which the C call took place, set after a call to C. =item C BOOL indicating if the C call exited successfully. This gets set after C and C. =item C BOOL indicating if the module was installed. This gets set after C exits successfully. =item uninstalled () BOOL indicating if the module was uninstalled properly. =item C<_create_args ()> Storage of the arguments passed to C for this object. Used for recursive calls when satisfying prerequisites. =item C<_install_args ()> Storage of the arguments passed to C for this object. Used for recursive calls when satisfying prerequisites. =back =head1 METHODS =head2 $bool = CPANPLUS::Dist::Build->format_available(); Returns a boolean indicating whether or not you can use this package to create and install modules in your environment. =head2 $bool = $dist->init(); Sets up the C object for use. Effectively creates all the needed status accessors. Called automatically whenever you create a new C object. =head2 $bool = $dist->prepare([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', force => BOOL, verbose => BOOL]) C prepares a distribution, running C and establishing any prerequisites this distribution has. The variable C will be set to the full path of the C that is being executed. This enables any code inside the C to know that it is being installed via CPANPLUS. After a successful C you may call C to create the distribution, followed by C to actually install it. Returns true on success and false on failure. =head2 $dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest => BOOL]) C preps a distribution for installation. This means it will run C and C. This will also satisfy any prerequisites the module may have. If you set C to true, it will skip the C stage. If you set C to true, it will go over all the stages of the C process again, ignoring any previously cached results. It will also ignore a bad return value from C and still allow the operation to return true. Returns true on success and false on failure. You may then call C<< $dist->install >> on the object to actually install it. =head2 $dist->install([verbose => BOOL, perl => /path/to/perl]) Actually installs the created dist. Returns true on success and false on failure. =head1 PROMINENCE Originally by Jos Boumans Ekane@cpan.orgE. Brought to working condition by Ken Williams Ekwilliams@cpan.orgE. Other hackery and currently maintained by Chris C Williams ( no relation ). Ebingos@cpan.orgE. =head1 AUTHOR Jos Boumans , Ken Williams =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2017 by Jos Boumans, Ken Williams, Chris Williams and David Golden. 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 CPANPLUS-Dist-Build-0.88/lib/CPANPLUS/Dist/Build/000755 001751 001751 00000000000 13106071257 021401 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/lib/CPANPLUS/Dist/Build/Constants.pm000644 001751 001751 00000004233 13106071257 023715 0ustar00bingosbingos000000 000000 package CPANPLUS::Dist::Build::Constants; $CPANPLUS::Dist::Build::Constants::VERSION = '0.88'; #ABSTRACT: Constants for CPANPLUS::Dist::Build use if $] > 5.017, 'deprecate'; use strict; use warnings; use File::Spec; BEGIN { require Exporter; use vars qw[@ISA @EXPORT]; @ISA = qw[Exporter]; @EXPORT = qw[ BUILD_DIR BUILD CPDB_PERL_WRAPPER]; } use constant BUILD_DIR => sub { return @_ ? File::Spec->catdir($_[0], '_build') : '_build'; }; use constant BUILD => sub { my $file = @_ ? File::Spec->catfile($_[0], 'Build') : 'Build'; ### on VMS, '.com' is appended when ### creating the Build file $file .= '.com' if $^O eq 'VMS'; return $file; }; use constant CPDB_PERL_WRAPPER => 'use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }'; 1; # Local variables: # c-indentation-style: bsd # c-basic-offset: 4 # indent-tabs-mode: nil # End: # vim: expandtab shiftwidth=4: __END__ =pod =encoding UTF-8 =head1 NAME CPANPLUS::Dist::Build::Constants - Constants for CPANPLUS::Dist::Build =head1 VERSION version 0.88 =head1 SYNOPSIS use CPANPLUS::Dist::Build::Constants; =head1 DESCRIPTION CPANPLUS::Dist::Build::Constants provides some constants required by L. =head1 PROMINENCE Originally by Jos Boumans Ekane@cpan.orgE. Brought to working condition and currently maintained by Ken Williams Ekwilliams@cpan.orgE. =head1 AUTHOR Jos Boumans , Ken Williams =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2017 by Jos Boumans, Ken Williams, Chris Williams and David Golden. 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 CPANPLUS-Dist-Build-0.88/t/inc/000755 001751 001751 00000000000 13106071257 016460 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/00-compile.t000644 001751 001751 00000002713 13106071257 017744 0ustar00bingosbingos000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.056 use Test::More; plan tests => 2 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'CPANPLUS/Dist/Build.pm', 'CPANPLUS/Dist/Build/Constants.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; CPANPLUS-Dist-Build-0.88/t/author-pod-syntax.t000644 001751 001751 00000000454 13106071257 021505 0ustar00bingosbingos000000 000000 #!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # 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(); CPANPLUS-Dist-Build-0.88/t/author-pod-coverage.t000644 001751 001751 00000000536 13106071257 021753 0ustar00bingosbingos000000 000000 #!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # 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' }); CPANPLUS-Dist-Build-0.88/t/02_CPANPLUS-Dist-Build.t000644 001751 001751 00000022271 13106071257 021564 0ustar00bingosbingos000000 000000 ### make sure we can find our conf.pl file BEGIN { use FindBin; require "$FindBin::Bin/inc/conf.pl"; } use strict; use CPANPLUS::Configure; use CPANPLUS::Backend; use CPANPLUS::Internals::Constants; use CPANPLUS::Module::Fake; use CPANPLUS::Module::Author::Fake; use Config; use Test::More 'no_plan'; use File::Basename qw[basename]; use Data::Dumper; use IPC::Cmd 'can_run'; $SIG{__WARN__} = sub {warn @_ unless @_ && $_[0] =~ /redefined|isn't numeric/}; # Load these two modules in advance, even though they would be # auto-loaded, because we want to override some of their subs. use ExtUtils::Packlist; use ExtUtils::Installed; my $Class = 'CPANPLUS::Dist::Build'; my $Utils = 'CPANPLUS::Internals::Utils'; my $Have_CC = can_run($Config{'cc'} )? 1 : 0; my $Usedl = $Config{usedl} ? 1 : 0; my $Lib = File::Spec->rel2abs(File::Spec->catdir( qw[dummy-perl] )); my $Src = File::Spec->rel2abs(File::Spec->catdir( qw[src] )); my $Verbose = @ARGV ? 1 : 0; my $Conf = gimme_conf(); my $CB = CPANPLUS::Backend->new( $Conf ); #$Conf->set_conf( base => 'dummy-cpanplus' ); #$Conf->set_conf( dist_type => '' ); #$Conf->set_conf( verbose => $Verbose ); #$Conf->set_conf( signature => 0 ); ### running tests will mess with the test output so skip 'm #$Conf->set_conf( skiptest => 1 ); ### create a fake object, so we don't use the actual module tree ### make sure to add dslip data, so CPANPLUS doesn't try to find ### it in another module in the package, for which it needs the ### module tree my $Mod = CPANPLUS::Module::Fake->new( module => 'Foo::Bar', path => 'src', author => CPANPLUS::Module::Author::Fake->new, package => 'Foo-Bar-0.01.tar.gz', dslip => 'RdpO?', ); ### dmq tells us that we should run with /nologo ### if using nmake, as it's very noise otherwise. ### XXX copied from CPANPLUS' test include file! { my $make = $Conf->get_program('make'); if( $make and basename($make) =~ /^nmake/i and $make !~ m|/nologo| ) { $make .= ' /nologo'; $Conf->set_program( make => $make ); } } # path, cc needed? my %Map = ( noxs => 0, xs => 1 ); ### Disable certain possible settings, so we dont accidentally ### touch anything outside our sandbox { ### set buildflags to install in our dummy perl dir $Conf->set_conf( buildflags => "install_base=$Lib" ); ### don't start sending test reports now... ### $CB->_callbacks->send_test_report( sub { 0 } ); $Conf->set_conf( cpantest => 0 ); ### we dont need sudo -- we're installing in our own sandbox now $Conf->set_program( sudo => undef ); } use_ok( $Class ); ok( $Class->format_available, "Format is available" ); while( my($path,$need_cc) = each %Map ) { my $mod = $Mod->clone; ok( $mod, "Module object created for '$path'" ); ### set the fetch location -- it's local { my $where = File::Spec->rel2abs( File::Spec->catfile( $Src, $path, $mod->package ) ); $mod->status->fetch( $where ); ok( -e $where, " Tarball '$where' exists" ); } ok( $mod->prepare, " Preparing module" ); ok( $mod->status->dist_cpan, " Dist registered as status" ); isa_ok( $mod->status->dist_cpan, $Class ); ok( $mod->status->dist_cpan->status->prepared, " Prepared status registered" ); is( $mod->status->dist_cpan->status->distdir, $mod->status->extract, " Distdir status registered properly" ); is( $mod->status->installer_type, INSTALLER_BUILD, " Proper installer type found" ); ### we might not have a C compiler SKIP: { skip("Perl wasn't built with support for dynamic loading " . "-- skipping compile tests", 5) unless $Usedl; skip("The CC compiler listed in Config.pm is not available " . "-- skipping compile tests", 5) if $need_cc && !$Have_CC; skip("Module::Build is not compiled with C support ". "-- skipping compile tests", 5) unless $Module::Build::VERSION >= 0.36 || eval { require Module::Build::ConfigData; Module::Build::ConfigData->feature('C_support') }; ok( $mod->create( ), "Creating module" ); ok( $mod->status->dist_cpan->status->created, " Created status registered" ); ### install tests SKIP: { skip("Install tests require Module::Build 0.2606 or higher", 2) unless $Module::Build::VERSION >= '0.2606'; local $ENV{MODULEBUILDRC}; local $ENV{PERL_MB_OPT}; ### flush the lib cache ### otherwise, cpanplus thinks the module's already installed ### since the blib is already in @INC $CB->_flush( list => [qw|lib|] ); ### force the install, make sure the Dist::Build->install() ### sub gets called ok( $mod->install( force => 1 ), "Installing module" ); ok( $mod->status->installed, " Status says module installed" ); } SKIP: { my $minversion = 0.2609; skip(qq[Uninstalling requires at least Module::Build $minversion], 1) unless eval { Module::Build->VERSION($minversion); 1 }; # The installation directory actually needs to be in @INC # in order to test uninstallation { my $libdir = File::Spec->catdir($Lib, 'lib', 'perl5'); # lib.pm is documented to require unix-style paths $libdir = VMS::Filespec::unixify($libdir) if $^O eq 'VMS'; 'lib'->import( $libdir ); } # EU::Installed and CP+::M are only capable of searching # for modules in the core directories. We need to fake # them out with our own subs here. my $packlist = find_module($mod->name . '::.packlist'); ok $packlist, "Found packlist"; my $p = ExtUtils::Packlist->new($packlist); ok keys(%$p) > 0, "Packlist contains entries"; local *CPANPLUS::Module::installed_version = sub {1}; local *CPANPLUS::Module::packlist = sub { [$p] }; local *ExtUtils::Installed::files = sub { keys %$p }; ok( $mod->uninstall,"Uninstalling module" ); } } ### throw away all the extracted stuff $Utils->_rmdir( dir => $Conf->get_conf('base') ); } ### test ENV setting while running Build.PL code SKIP: { ### use print() not die() -- we're redirecting STDERR in tests! my $env = ENV_CPANPLUS_IS_EXECUTING; skip("Can't test ENV{$env} -- no buffers available") unless IPC::Cmd->can_capture_buffer; my $clone = $Mod->clone; ok( $clone, 'Testing ENV settings $dist->prepare' ); $clone->status->fetch( File::Spec->catfile($Src, 'noxs', $clone->package) ); ok( $clone->extract, ' Files extracted' ); ### write our own Build.PL file my $build_pl = BUILD_PL->( $clone->status->extract ); { my $fh = OPEN_FILE->( $build_pl, '>' ); print $fh "die qq[ENV=\$ENV{$env}\n];"; close $fh; } ok( -e $build_pl, " File exists" ); ### clear errors CPANPLUS::Error->flush; ### since we're die'ing in the Build.PL, localize ### $CPANPLUS::Error::ERROR_FH and redirect to devnull ### so we dont spam the result through the test ### as this is expected behaviour after all. my $rv = do { local *CPANPLUS::Error::ERROR_FH; open $CPANPLUS::Error::ERROR_FH, ">", File::Spec->devnull; $clone->prepare( force => 1 ) }; ok( !$rv, ' $mod->prepare failed' ); my $re = quotemeta( $build_pl ); like( CPANPLUS::Error->stack_as_string, qr/ENV=$re/, " \$ENV $env set correctly during execution"); ### and the ENV var should no longer be set now ok( !$ENV{$env}, " ENV var now unset" ); } sub find_module { my $module = shift; ### Don't add the .pm yet, in case it's a packlist or something ### like ExtUtils::xsubpp. my $file = File::Spec->catfile( split m/::/, $module ); my $candidate; foreach (@INC) { if (-e ($candidate = File::Spec->catfile($_, $file)) or -e ($candidate = File::Spec->catfile($_, "$file.pm")) or -e ($candidate = File::Spec->catfile($_, 'auto', $file)) or -e ($candidate = File::Spec->catfile($_, 'auto', "$file.pm")) or -e ($candidate = File::Spec->catfile($_, $Config{archname}, 'auto', $file)) or -e ($candidate = File::Spec->catfile($_, $Config{archname}, 'auto', "$file.pm"))) { return $candidate; } } return; } # Local variables: # c-indentation-style: bsd # c-basic-offset: 4 # indent-tabs-mode: nil # End: # vim: expandtab shiftwidth=4: CPANPLUS-Dist-Build-0.88/t/src/000755 001751 001751 00000000000 13106071257 016476 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/01_CPANPLUS-Dist-Build-Constants.t000644 001751 001751 00000001161 13106071257 023530 0ustar00bingosbingos000000 000000 ### make sure we can find our conf.pl file BEGIN { use FindBin; require "$FindBin::Bin/inc/conf.pl"; } BEGIN { chdir 't' if -d 't' }; ### this is to make devel::cover happy ### BEGIN { use File::Spec; require lib; for (qw[../lib inc]) { my $l = 'lib'; $l->import(File::Spec->rel2abs($_)) } } use strict; use Test::More 'no_plan'; my $Class = 'CPANPLUS::Dist::Build::Constants'; use_ok( $Class ); for my $name ( qw[BUILD BUILD_DIR] ) { my $sub = $Class->can( $name ); ok( $sub, "$Class can $name" ); ok( $sub->(), " $name called OK" ); } CPANPLUS-Dist-Build-0.88/t/dummy-CPAN/000755 001751 001751 00000000000 13106071257 017561 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/dummy-CPAN/authors/000755 001751 001751 00000000000 13106071257 021246 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/dummy-CPAN/modules/000755 001751 001751 00000000000 13106071257 021231 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/dummy-CPAN/modules/03modlist.data.gz000644 001751 001751 00000001107 13106071257 024320 0ustar00bingosbingos000000 000000 1E03modlist.data]Sk09+.# $!u `[? de(-# &IlƠwzTȡ&L'JZ7Nmld9T͙\p~Yf"mn3{~hVfR l m|~~DSLLN3]3Ѵ+ Ygݲke$\v4-vPo~F[[ }MD/ =N#hP<' Lp=QpЦ:]k0_8^ۂE ZЮX=G-^mOO{>_SCPANPLUS-Dist-Build-0.88/t/dummy-CPAN/modules/02packages.details.txt.gz000644 001751 001751 00000000727 13106071257 025763 0ustar00bingosbingos000000 000000 g3J02packages.details.txtQo0S 5kAUh{C^|k-;/+ݧ^*:H>GT(x\g I3AIe Q+lݲ]*dh5Vu5rr%mMЖ٠ڀ+noM:i%c[wZi}EôI QҩuFF*A6lGڠUנ!cɥ՚ZiO[' xw02ʡEэ {NfOaO|HfSZ*v!U>I99_djtBLJ!VpPW,ӐM # 0/^ū!o!&!Vp^Ad;"Q>IoTs)^!|~N,geD~:]^/+g!DzxO&CPANPLUS-Dist-Build-0.88/t/dummy-CPAN/authors/01mailrc.txt.gz000644 001751 001751 00000000264 13106071257 024040 0ustar00bingosbingos000000 000000 J01mailrc.txtKL,Vp V%׊В̜b++T.RJ:秤*$$;V$%)q%B |"u;7?4'ʩ43'hpgj''O?w`N%猢bhn1PSFQCRf^z~q^j P^i6P3 CCPANPLUS-Dist-Build-0.88/t/src/xs/000755 001751 001751 00000000000 13106071257 017130 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/src/noxs/000755 001751 001751 00000000000 13106071257 017465 5ustar00bingosbingos000000 000000 CPANPLUS-Dist-Build-0.88/t/src/noxs/Foo-Bar-0.01.tar.gz000644 001751 001751 00000001543 13106071257 022420 0ustar00bingosbingos000000 000000 8MBFoo-Bar-0.01.tar[o0y8-Jr jtJP F$6ʥ]5&ju=K9>qrhjfP ˒ְiJISu %U-*dJSߵ[W$M_}֐n_7oX y``0v=JOHqd;v9kM/nYCcs?t*QudRdژybX2ukjUà&yFYjUƶ[iO!?w\\7a`rY7U/xioٿA-ҷGb!L Ol9?:=k{b3x4{GwOϏ:5 B3\FCp̸= udk|ڃ}PO0i8|vKi QM n6eX)‡DGK!r"5J@|겉xwAfT5eBlu^۞VqBdO\jaQٞHtę<,1$DuY)`BXG4֞Mky4 "xLq-&ߜ5n4V"NQ:Kv2#GFo Dx+CL^8`Oa4Vph CY}JfwQRkDr0 <7HǕgd?]c񟩩EO,          O kPCPANPLUS-Dist-Build-0.88/t/src/xs/Foo-Bar-0.01.tar.gz000644 001751 001751 00000003005 13106071257 022056 0ustar00bingosbingos000000 000000 8MBFoo-Bar-0.01.tarZOIWx6h"+\04n-ll2;+{cd=wv>}72}tȘO ӧYț3lZ\6[ȘV>{''0Pظ;e>Yrn gV~֢C[z+sˤ>$\X&&pPo'eeǡv9s>1w ˧6S"P4̅,3'>eOb?n\*hߴWcoyvvlMj 1aӫsJS,ln'gw9bNqQv&ѷک]dv}GHXP*AfpJUj֯s:n+$-+WxL :׀G! :dB`ߍ6ޜN<~.yW]nUexe_kV|րn^/Z0ٴG:,NPQb 8{@'"=UTEJ𤊻@S:;j 1pRv<W8{/Pw 45p#w2 }m@/:ʑ^?ȣwAqOͩ9p$Jqω|yhY RElOz4l:]Pq4MGLSʹ-`cE Jb0BC5Ival>FƺW} }?O}/miC67| Rspr-B㣹cj/\.ĊD+@hVˮZHxtc@*l:PxjUn >:B.^0VM4b# ZY / v߼cCVoT {;vRo\k|[h=_*z p un`oǎK|;Ex4"Y6+lf2z_ 4l(_M#hu,B DJE SKSY~ yR{GAUQлcO9՞bq*%ҡpAsolXܪ)~j?Sx\ZplUF>ɷL0K?P/DeW痁4뿖0𧖧#% 0 x2$?_9o=rel2abs( $_ ) } grep { not File::Spec->file_name_is_absolute( $_ ) } @INC; ### use require to make devel::cover happy require lib; for ( @paths, @rel2abs ) { my $l = 'lib'; $l->import( $_ ) } use Config; ### and add them to the environment, so shellouts get them $old_env_perl5lib = $ENV{'PERL5LIB'}; $ENV{'PERL5LIB'} = join $Config{'path_sep'}, grep { defined } $ENV{'PERL5LIB'}, @paths, @rel2abs; ### add CPANPLUS' bin dir to the front of $ENV{PATH}, so that cpanp-run-perl ### and friends get picked up, only under PERL_CORE though. $old_env_path = $ENV{PATH}; if ( $ENV{PERL_CORE} ) { $ENV{'PATH'} = join $Config{'path_sep'}, grep { defined } "$FindBin::Bin/../../../utils", $ENV{'PATH'}; } ### Fix up the path to perl, as we're about to chdir ### but only under perlcore, or if the path contains delimiters, ### meaning it's relative, but not looked up in your $PATH $^X = File::Spec->rel2abs( $^X ) if $ENV{PERL_CORE} or ( $^X =~ m|[/\\]| ); ### chdir to our own test dir, so we know all files are relative ### to this point, no matter whether run from perlcore tests or ### regular CPAN installs chdir "$FindBin::Bin" if -d "$FindBin::Bin" } BEGIN { use IPC::Cmd; ### Win32 has issues with redirecting FD's properly in IPC::Run: ### Can't redirect fd #4 on Win32 at IPC/Run.pm line 2801 $IPC::Cmd::USE_IPC_RUN = 0 if $^O eq 'MSWin32'; $IPC::Cmd::USE_IPC_RUN = 0 if $^O eq 'MSWin32'; } ### Use a $^O comparison, as depending on module at this time ### may cause weird errors/warnings END { if ($^O eq 'VMS') { ### VMS environment variables modified by this test need to be put back ### path is "magic" on VMS, we can not tell if it really existed before ### this was run, because VMS will magically pretend that a PATH ### environment variable exists set to the current working directory $ENV{PATH} = $old_env_path; if (defined $old_env_perl5lib) { $ENV{PERL5LIB} = $old_env_perl5lib; } else { delete $ENV{PERL5LIB}; } } } use strict; use CPANPLUS::Configure; use CPANPLUS::Error (); use File::Path qw[rmtree]; use FileHandle; use File::Basename qw[basename]; { ### Force the ignoring of .po files for L::M::S $INC{'Locale::Maketext::Lexicon.pm'} = __FILE__; $Locale::Maketext::Lexicon::VERSION = 0; } my $Env = 'PERL5_CPANPLUS_TEST_VERBOSE'; # prereq has to be in our package file && core! use constant TEST_CONF_PREREQ => 'Cwd'; use constant TEST_CONF_MODULE => 'Foo::Bar::EU::NOXS'; use constant TEST_CONF_MODULE_SUB => 'Foo::Bar::EU::NOXS::Sub'; use constant TEST_CONF_AUTHOR => 'EUNOXS'; use constant TEST_CONF_INST_MODULE => 'Foo::Bar'; use constant TEST_CONF_INVALID_MODULE => 'fnurk'; use constant TEST_CONF_MIRROR_DIR => 'dummy-localmirror'; use constant TEST_CONF_CPAN_DIR => 'dummy-CPAN'; use constant TEST_CONF_CPANPLUS_DIR => 'dummy-cpanplus'; use constant TEST_CONF_INSTALL_DIR => File::Spec->rel2abs( File::Spec->catdir( TEST_CONF_CPANPLUS_DIR, 'install' ) ); ### we might need this Some Day when we're installing into ### our own sandbox. see t/20.t for details # use constant TEST_INSTALL_DIR => do { # my $dir = File::Spec->rel2abs( 'dummy-perl' ); # # ### clean up paths if we are on win32 # ### dirs with spaces will be.. bad :( # $^O eq 'MSWin32' # ? Win32::GetShortPathName( $dir ) # : $dir; # }; # use constant TEST_INSTALL_DIR_LIB # => File::Spec->catdir( TEST_INSTALL_DIR, 'lib' ); # use constant TEST_INSTALL_DIR_BIN # => File::Spec->catdir( TEST_INSTALL_DIR, 'bin' ); # use constant TEST_INSTALL_DIR_MAN1 # => File::Spec->catdir( TEST_INSTALL_DIR, 'man', 'man1' ); # use constant TEST_INSTALL_DIR_MAN3 # => File::Spec->catdir( TEST_INSTALL_DIR, 'man', 'man3' ); # use constant TEST_INSTALL_DIR_ARCH # => File::Spec->catdir( TEST_INSTALL_DIR, 'arch' ); # # use constant TEST_INSTALL_EU_MM_FLAGS => # ' INSTALLDIRS=site' . # ' INSTALLSITELIB=' . TEST_INSTALL_DIR_LIB . # ' INSTALLSITEARCH=' . TEST_INSTALL_DIR_ARCH . # .packlist # ' INSTALLARCHLIB=' . TEST_INSTALL_DIR_ARCH . # perllocal.pod # ' INSTALLSITEBIN=' . TEST_INSTALL_DIR_BIN . # ' INSTALLSCRIPT=' . TEST_INSTALL_DIR_BIN . # ' INSTALLSITEMAN1DIR=' . TEST_INSTALL_DIR_MAN1 . # ' INSTALLSITEMAN3DIR=' . TEST_INSTALL_DIR_MAN3; sub dummy_cpan_dir { ### VMS needs this in directory format for rel2abs my $test_dir = $^O eq 'VMS' ? File::Spec->catdir(TEST_CONF_CPAN_DIR) : TEST_CONF_CPAN_DIR; ### Convert to an absolute file specification my $abs_test_dir = File::Spec->rel2abs($test_dir); ### According to John M: the hosts path needs to be in UNIX format. ### File::Spec::Unix->rel2abs does not work at all on VMS $abs_test_dir = VMS::Filespec::unixify( $abs_test_dir ) if $^O eq 'VMS'; return $abs_test_dir; } sub gimme_conf { ### don't load any other configs than the heuristic one ### during tests. They might hold broken/incorrect data ### for our test suite. Bug [perl #43629] showed this. my $conf = CPANPLUS::Configure->new( load_configs => 0 ); my $dummy_cpan = dummy_cpan_dir(); $conf->set_conf( hosts => [ { path => $dummy_cpan, scheme => 'file', } ], ); $conf->set_conf( base => File::Spec->rel2abs(TEST_CONF_CPANPLUS_DIR)); $conf->set_conf( dist_type => '' ); $conf->set_conf( signature => 0 ); $conf->set_conf( verbose => 1 ) if $ENV{ $Env }; ### never use a pager in the test suite $conf->set_program( pager => '' ); ### dmq tells us that we should run with /nologo ### if using nmake, as it's very noisy otherwise. { my $make = $conf->get_program('make'); if( $make and basename($make) =~ /^nmake/i ) { $conf->set_conf( makeflags => '/nologo' ); } } ### CPANPLUS::Config checks 3 specific scenarios first ### when looking for cpanp-run-perl: parallel to cpanp, ### parallel to CPANPLUS.pm, or installed into a custom ### prefix like /tmp/foo. Only *THEN* does it check the ### the path. ### If the perl core is extracted to a directory that has ### cpanp-run-perl installed the same amount of 'uplevels' ### as the /tmp/foo prefix, we'll pull in the wrong script ### by accident. ### Since we set the path to cpanp-run-perl explicitly ### at the top of this script, it's best to update the config ### ourselves with a path lookup, rather than rely on its ### heuristics. Thanks to David Wheeler, Josh Jore and Vincent ### Pit for helping to track this down. if( $ENV{PERL_CORE} ) { $conf->set_program( "perlwrapper" => IPC::Cmd::can_run('cpanp-run-perl') ); } $conf->set_conf( source_engine => $ENV{CPANPLUS_SOURCE_ENGINE} ) if $ENV{CPANPLUS_SOURCE_ENGINE}; _clean_test_dir( [ $conf->get_conf('base'), TEST_CONF_MIRROR_DIR, # TEST_INSTALL_DIR_LIB, # TEST_INSTALL_DIR_BIN, # TEST_INSTALL_DIR_MAN1, # TEST_INSTALL_DIR_MAN3, ], ( $ENV{PERL_CORE} ? 0 : 1 ) ); return $conf; }; # placeholder ### clean these files if we're under perl core END { if ( $ENV{PERL_CORE} ) { _clean_test_dir( [ gimme_conf->get_conf('base'), TEST_CONF_MIRROR_DIR, # TEST_INSTALL_DIR_LIB, # TEST_INSTALL_DIR_BIN, # TEST_INSTALL_DIR_MAN1, # TEST_INSTALL_DIR_MAN3, ], 0 ); # DO NOT be verbose under perl core -- makes tests fail } } ### whenever we start a new script, we want to clean out our ### old files from the test '.cpanplus' dir.. sub _clean_test_dir { my $dirs = shift || []; my $verbose = shift || 0; for my $dir ( @$dirs ) { ### no point if it doesn't exist; next unless -d $dir; my $dh; opendir $dh, $dir or die "Could not open basedir '$dir': $!"; while( my $file = readdir $dh ) { next if $file =~ /^\./; # skip dot files my $path = File::Spec->catfile( $dir, $file ); ### directory, rmtree it if( -d $path ) { ### John Malmberg reports yet another VMS issue: ### A directory name on VMS in VMS format ends with .dir ### when it is referenced as a file. ### In UNIX format traditionally PERL on VMS does not remove the ### '.dir', however the VMS C library conversion routines do ### remove the '.dir' and the VMS C library routines can not ### handle the '.dir' being present on UNIX format filenames. ### So code doing the fixup has on VMS has to be able to handle ### both UNIX format names and VMS format names. ### XXX See http://www.xray.mpe.mpg.de/ ### mailing-lists/perl5-porters/2007-10/msg00064.html ### for details -- the below regex could use some touchups ### according to John. M. $file =~ s/\.dir$//i if $^O eq 'VMS'; my $dirpath = File::Spec->catdir( $dir, $file ); print "# Deleting directory '$dirpath'\n" if $verbose; eval { rmtree( $dirpath ) }; warn "Could not delete '$dirpath' while cleaning up '$dir'" if $@; ### regular file } else { print "# Deleting file '$path'\n" if $verbose; 1 while unlink $path; } } close $dh; } return 1; } 1;