Hello community, here is the log from the commit of package perl-local-lib for openSUSE:Factory checked in at 2015-11-24 22:33:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-local-lib (Old) and /work/SRC/openSUSE:Factory/.perl-local-lib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-local-lib" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-local-lib/perl-local-lib.changes 2015-02-08 11:43:05.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-local-lib.new/perl-local-lib.changes 2015-11-24 22:34:27.000000000 +0100 @@ -1,0 +2,23 @@ +Sun Nov 22 06:43:18 UTC 2015 - [email protected] + +- update to 2.00018 + 2.000018 - 2015-10-29 + - repair CPAN.pm bootstrapping broken by extraneous prerequisite. + - ensure directories are created in correct order to avoid errors + + 2.000017 - 2015-10-06 + - fix shell quoting for fish shell + - work around issue where some cpanm versions wouldn't upgrade + ExtUtils::MakeMaker in some cases it should have + - added --quiet option to surpress directory creation message + - build_environment_vars_for, build_activate_environment_vars_for, and + environment_vars_string_for options will always include directories being + added, even if they were already in current ENV vars + - fixes for author tests + - create directory structure under created local::libs, ensuring arch dirs + will always be added to @INC by perl + - only cause CPAN.pm to prefer ExtUtils::MakeMaker over Module::Build during + bootstrap process, not after + - bootstrap process refactored + +------------------------------------------------------------------- Old: ---- local-lib-2.000015.tar.gz New: ---- local-lib-2.000018.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-local-lib.spec ++++++ --- /var/tmp/diff_new_pack.kIYIk7/_old 2015-11-24 22:34:28.000000000 +0100 +++ /var/tmp/diff_new_pack.kIYIk7/_new 2015-11-24 22:34:28.000000000 +0100 @@ -18,7 +18,7 @@ Name: perl-local-lib -Version: 2.000015 +Version: 2.000018 Release: 0 Summary: Create and Use a local Library Directory for Perl Modules License: Artistic-1.0 or GPL-1.0+ @@ -34,7 +34,7 @@ BuildRequires: perl(CPAN) >= 1.82 BuildRequires: perl(ExtUtils::Install) >= 1.43 BuildRequires: perl(ExtUtils::MakeMaker) >= 7.00 -BuildRequires: perl(Module::Build) >= 0.3600 +BuildRequires: perl(Module::Build) >= 0.360000 Requires: perl(CPAN) >= 1.82 %{perl_requires} ++++++ local-lib-2.000015.tar.gz -> local-lib-2.000018.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/Changes new/local-lib-2.000018/Changes --- old/local-lib-2.000015/Changes 2014-12-12 16:48:30.000000000 +0100 +++ new/local-lib-2.000018/Changes 2015-10-29 18:10:38.000000000 +0100 @@ -1,5 +1,24 @@ Revision history for local::lib +2.000018 - 2015-10-29 + - repair CPAN.pm bootstrapping broken by extraneous prerequisite. + - ensure directories are created in correct order to avoid errors + +2.000017 - 2015-10-06 + - fix shell quoting for fish shell + - work around issue where some cpanm versions wouldn't upgrade + ExtUtils::MakeMaker in some cases it should have + - added --quiet option to surpress directory creation message + - build_environment_vars_for, build_activate_environment_vars_for, and + environment_vars_string_for options will always include directories being + added, even if they were already in current ENV vars + - fixes for author tests + - create directory structure under created local::libs, ensuring arch dirs + will always be added to @INC by perl + - only cause CPAN.pm to prefer ExtUtils::MakeMaker over Module::Build during + bootstrap process, not after + - bootstrap process refactored + 2.000015 - 2014-12-12 - Avoid using += in Makefile when bootstrapping for portability (RT#100797) - adjust quoting of paths with spaces to work with ExtUtils::MakeMaker 7.0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/LICENSE new/local-lib-2.000018/LICENSE --- old/local-lib-2.000015/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/LICENSE 2015-05-28 02:13:50.000000000 +0200 @@ -0,0 +1,379 @@ +This software is copyright (c) 2007 by Matt S Trout. + +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) 2007 by Matt S Trout. + +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, Suite 500, Boston, MA 02110-1335 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + 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. + + <signature of Ty Coon>, 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) 2007 by Matt S Trout. + +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 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/MANIFEST new/local-lib-2.000018/MANIFEST --- old/local-lib-2.000015/MANIFEST 2014-12-12 16:48:49.000000000 +0100 +++ new/local-lib-2.000018/MANIFEST 2015-10-29 18:11:28.000000000 +0100 @@ -1,11 +1,12 @@ Changes eg/scripted_install.pl inc/CheckVersion.pm -inc/ConfigCPAN.pm +inc/CPAN.pm lib/lib/core/only.pm lib/local/lib.pm lib/POD2/DE/local/lib.pod lib/POD2/PT_BR/local/lib.pod +LICENSE maint/Makefile.PL.include Makefile.PL MANIFEST This list of files @@ -22,14 +23,13 @@ t/stackable.t t/subroutine-in-inc.t t/taint-mode.t +xt/author/cpan-changes.t +xt/author/eol.t +xt/author/minimum-version.t +xt/author/no-tabs.t +xt/author/pod-syntax.t xt/bootstrap.t xt/install.t -xt/release/cpan-changes.t -xt/release/eol.t -xt/release/kwalitee.t -xt/release/minimum-version.t -xt/release/no-tabs.t -xt/release/pod-syntax.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) README README file (added by Distar) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/META.json new/local-lib-2.000018/META.json --- old/local-lib-2.000015/META.json 2014-12-12 16:48:48.000000000 +0100 +++ new/local-lib-2.000018/META.json 2015-10-29 18:11:28.000000000 +0100 @@ -4,7 +4,7 @@ "mst - Matt S. Trout (cpan:MSTROUT) <[email protected]>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7, CPAN::Meta::Converter version 2.142690", + "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], @@ -71,5 +71,5 @@ }, "x_IRC" : "irc://irc.perl.org/#local-lib" }, - "version" : "2.000015" + "version" : "2.000018" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/META.yml new/local-lib-2.000018/META.yml --- old/local-lib-2.000015/META.yml 2014-12-12 16:48:48.000000000 +0100 +++ new/local-lib-2.000018/META.yml 2015-10-29 18:11:28.000000000 +0100 @@ -6,7 +6,7 @@ Test::More: '0' configure_requires: {} dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7, CPAN::Meta::Converter version 2.142690' +generated_by: 'ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -27,4 +27,4 @@ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=local-lib license: http://dev.perl.org/licenses/ repository: git://github.com/Perl-Toolchain-Gang/local-lib -version: '2.000015' +version: '2.000018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/Makefile.PL new/local-lib-2.000018/Makefile.PL --- old/local-lib-2.000015/Makefile.PL 2014-12-09 21:15:57.000000000 +0100 +++ new/local-lib-2.000018/Makefile.PL 2015-10-29 11:41:51.000000000 +0100 @@ -134,37 +134,37 @@ my @modules = grep $requires->{$_}, qw(ExtUtils::MakeMaker ExtUtils::Install Module::Build CPAN); - no warnings 'once'; - package MY; - *MY::init_PERL = sub { - my $self = shift; - $self->SUPER::init_PERL(@_); - $self->{PERL} .= ' -I$(INSTALLPRIVLIB)'; - $self->{FULLPERL} .= ' -I$(INSTALLPRIVLIB)'; - }; + { + no warnings 'once'; + package MY; + *init_PERL = sub { + my $self = shift; + $self->SUPER::init_PERL(@_); + $self->{PERL} .= ' -I$(INSTALLPRIVLIB)'; + $self->{FULLPERL} .= ' -I$(INSTALLPRIVLIB)'; + }; + } local $ENV{PERL_AUTOINSTALL_PREFER_CPAN} = 1; local $ENV{PERL_MM_USE_DEFAULT} = 1; - my @cpan_command = map qq{force(q[install],q[$_]);}, @modules; - - if (@cpan_command || $disable_manpages) { - system($^X, '-Minc::ConfigCPAN', '-', 'configure'); + if (@modules || $disable_manpages) { + system($^X, '-Minc::CPAN=init_config'); } - if (@cpan_command) { - system($^X, '-MCPAN', '-e', $_) - for @cpan_command; + if (@modules) { + system($^X, '-Minc::CPAN=install', '-', $_) + for @modules; } if (grep { $_ eq 'CPAN' } @modules ) { system($^X, '-MCPAN', '-e', 'CPAN::Config->load;CPAN::Config->commit;'); } if ($disable_manpages) { - system($^X, '-Minc::ConfigCPAN', '-', 'disable_manpages'); + system($^X, '-Minc::CPAN=disable_manpages'); } } if (!$ENV{PERL5_CPANM_IS_RUNNING}) { - my $status = system $^X, '-Minc::ConfigCPAN', '-', 'check', + my $status = system $^X, '-Minc::CPAN=check', '-', $META{prereqs}{runtime}{requires}{CPAN}; exit $status if $status; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/README new/local-lib-2.000018/README --- old/local-lib-2.000015/README 2014-12-12 16:48:48.000000000 +0100 +++ new/local-lib-2.000018/README 2015-10-29 18:11:28.000000000 +0100 @@ -25,9 +25,9 @@ PATH="/home/username/perl5/bin:$PATH"; export PATH; PERL_LOCAL_LIB_ROOT="/home/usename/perl5:$PERL_LOCAL_LIB_ROOT"; export PERL_LOCAL_LIB_ROOT; - From a .bashrc file - + From a .bash_profile or .bashrc file - - [ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" The bootstrapping technique A typical way to install local::lib is using what is known as the @@ -74,7 +74,7 @@ using bash or any other Bourne shells, you can add this to your shell startup script this way: - echo '[ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >>~/.bashrc + echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >>~/.bashrc If you are using C shell, you can do this as follows: @@ -87,7 +87,7 @@ need to give that as import parameter to the call of the local::lib module like this way: - echo '[ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc + echo 'eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc After writing your shell configuration file, be sure to re-read it to get the changed settings into your current shell's environment. @@ -115,11 +115,13 @@ cd ../mydir2 ... REPEAT ... - When used in a ".bashrc" file, it is recommended that you protect - against re-activating a directory in a sub-shell. This can be done by - checking the $SHLVL variable as shown in synopsis. Without this, - sub-shells created by the user or other programs will override changes - made to the parent shell's environment. + If you use .bashrc to activate a local::lib automatically, the + local::lib will be re-enabled in any sub-shells used, overriding + adjustments you may have made in the parent shell. To avoid this, you + can initialize the local::lib in .bash_profile rather than .bashrc, or + protect the local::lib invocation with a $SHLVL check: + + [ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" If you are working with several "local::lib" environments, you may want to remove some of them from the current environment without disturbing @@ -271,8 +273,8 @@ Arguments: $path Return value: None - Attempts to create the given path, and all required parent directories. - Throws an exception on failure. + Attempts to create a local::lib directory, including subdirectories and + all required parent directories. Throws an exception on failure. print_environment_vars_for Arguments: $path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/inc/CPAN.pm new/local-lib-2.000018/inc/CPAN.pm --- old/local-lib-2.000015/inc/CPAN.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/inc/CPAN.pm 2015-09-02 12:20:30.000000000 +0200 @@ -0,0 +1,111 @@ +package inc::CPAN; +use strict; +use warnings; + +sub import { + my ($class, $op) = @_; + + die "no operation specified!\n" + unless $op; + my $do = $class->can("cmd_$op") + or die "invalid operation $op\n"; + $do->(@ARGV); + exit 0; +} + +sub cmd_init_config { + require ExtUtils::MakeMaker; + my $done; + my $orig = ExtUtils::MakeMaker->can("prompt"); + no warnings 'once', 'redefine'; + *ExtUtils::MakeMaker::prompt = sub ($;$) { + if (!$done && $_[0] =~ /manual configuration/) { + $done++; + return "no"; + } + return $orig->(@_); + }; + require CPAN; + CPAN->import; + $CPAN::Config->{urllist} = ["http://www.cpan.org/"]; + + CPAN::Config->load; + unless ($done || -w $CPAN::Config->{keep_source_where}) { + my $save = $CPAN::Config->{urllist}; + delete @{$CPAN::Config}{keys %$CPAN::Config}; + $CPAN::Config->{urllist} = $save; + CPAN::Config->init; + } +} + +sub cmd_install { + my @modules = @_; + package main; + require CPAN; + CPAN->import; + CPAN::Config->load; + + # ExtUtils::ParseXS is a prerequisite of Module::Build. Previously, + # it included a Build.PL file. If CPAN.pm is configured to prefer + # Module::Build (the default), it would see the Build.PL file and assume + # MB was a prerequisite. This introduces a circular dependency, which would + # break installation. None of Module::Build's prerequisites include a + # Build.PL anymore, but continue to prefer EUMM as a precaution. + $CPAN::Config->{prefer_installer} = "EUMM"; + + force('install', @modules); +} + +sub cmd_disable_manpages { + require CPAN; + CPAN->import; + CPAN::HandleConfig->load; + $CPAN::Config->{makepl_arg} = 'INSTALLMAN1DIR=none INSTALLMAN3DIR=none'; + $CPAN::Config->{buildpl_arg} = '--install_path libdoc="" --install_path bindoc=""'; + CPAN::Config->commit; +} + +# make sure that the user doesn't have any existing CPAN config that'll +# cause us problems for the next few steps. +sub cmd_check { + my $cpan_version = shift; + # if CPAN loads this, it calls into CPAN::Shell which tries to run + # autoconfiguration. if it doesn't exist, we don't care + eval { require File::HomeDir; }; + require CPAN; + + # Need newish CPAN.pm for this, ergo skip it if that version of CPAN isn't + # installed yet. + # It will already be installed by the time we reach here if bootstrapping, + # otherwise, if we're running from CPAN then it will be installed soon + # enough, and we'll come back here.. + if (eval { require CPAN::HandleConfig; } ) { + CPAN::HandleConfig->require_myconfig_or_config; + if ( $CPAN::Config ) { + for my $setting (qw( + makepl_arg make_install_arg + mbuild_arg mbuild_install_arg mbuildpl_arg + )) { + my $value = $CPAN::Config->{$setting} or next; + if ($setting =~ /^make/ + ? $value =~ /(?:PREFIX|INSTALL_BASE)/ + : $value =~ /(?:--prefix|--install_base)/ + ) { + die <<"DEATH"; +WHOA THERE! It looks like you've got $CPAN::Config->{$setting} set in +your CPAN config. This is known to cause problems with local::lib. Please +either remove this setting or clear out your .cpan directory. +DEATH + } + } + } + } + else { + # Explode if it looks like requiring CPAN::HandleConfig should + # have worked, but didn't. + die $@ + if $CPAN::VERSION >= $cpan_version; + } +} + +1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/inc/ConfigCPAN.pm new/local-lib-2.000018/inc/ConfigCPAN.pm --- old/local-lib-2.000015/inc/ConfigCPAN.pm 2014-03-15 21:15:42.000000000 +0100 +++ new/local-lib-2.000018/inc/ConfigCPAN.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,102 +0,0 @@ -package inc::ConfigCPAN; -use strict; -use warnings; - -sub import { - my $op = shift @ARGV - or die "no operation specified!\n"; - my $do = __PACKAGE__->can("cmd_$op") - or die "invalid operation $op\n"; - $do->(@ARGV); - exit 0; -} - -sub cmd_configure { - require ExtUtils::MakeMaker; - my $done; - my $orig = ExtUtils::MakeMaker->can("prompt"); - no warnings 'once', 'redefine'; - *ExtUtils::MakeMaker::prompt = sub ($;$) { - if (!$done && $_[0] =~ /manual configuration/) { - $done++; - return "no"; - } - return $orig->(@_); - }; - require CPAN; - CPAN->import; - $CPAN::Config->{urllist} = ["http://www.cpan.org/"]; - - # <mst> all bootstrapped fine on one DH account - # <mst> on another, it tries to install man stuff into /usr/local - # <mst> cannot for the life of me figure out why - # <mst> (same fucking server as well) - # <mst> GOT THE BASTARD - # <mst> ExtUtils::ParseXS uses Module::Build - # <mst> but Module::Build depends on it - # <mst> so you need to set prefer_installer MM - # <mst> so cpan uses EU::ParseXS Makefile.PL - # <mst> since we already got EUMM, *that* works - $CPAN::Config->{prefer_installer} = "EUMM"; - CPAN::Config->load; - unless ($done || -w $CPAN::Config->{keep_source_where}) { - my $save = $CPAN::Config->{urllist}; - delete @{$CPAN::Config}{keys %$CPAN::Config}; - $CPAN::Config->{urllist} = $save; - CPAN::Config->init; - } -} - -sub cmd_disable_manpages { - require CPAN; - CPAN->import; - CPAN::HandleConfig->load; - $CPAN::Config->{makepl_arg} = 'INSTALLMAN1DIR=none INSTALLMAN3DIR=none'; - $CPAN::Config->{buildpl_arg} = '--install_path libdoc="" --install_path bindoc=""'; - CPAN::Config->commit; -} - -# make sure that the user doesn't have any existing CPAN config that'll -# cause us problems for the next few steps. -sub cmd_check { - my $cpan_version = shift; - # if CPAN loads this, it calls into CPAN::Shell which tries to run - # autoconfiguration. if it doesn't exist, we don't care - eval { require File::HomeDir; }; - require CPAN; - - # Need newish CPAN.pm for this, ergo skip it if that version of CPAN isn't - # installed yet. - # It will already be installed by the time we reach here if bootstrapping, - # otherwise, if we're running from CPAN then it will be installed soon - # enough, and we'll come back here.. - if (eval { require CPAN::HandleConfig; } ) { - CPAN::HandleConfig->require_myconfig_or_config; - if ( $CPAN::Config ) { - for my $setting (qw( - makepl_arg make_install_arg - mbuild_arg mbuild_install_arg mbuildpl_arg - )) { - my $value = $CPAN::Config->{$setting} or next; - if ($setting =~ /^make/ - ? $value =~ /(?:PREFIX|INSTALL_BASE)/ - : $value =~ /(?:--prefix|--install_base)/ - ) { - die <<"DEATH"; -WHOA THERE! It looks like you've got $CPAN::Config->{$setting} set in -your CPAN config. This is known to cause problems with local::lib. Please -either remove this setting or clear out your .cpan directory. -DEATH - } - } - } - } - else { - # Explode if it looks like requiring CPAN::HandleConfig should - # have worked, but didn't. - die $@ - if $CPAN::VERSION >= $cpan_version; - } -} - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/lib/local/lib.pm new/local-lib-2.000018/lib/local/lib.pm --- old/local-lib-2.000015/lib/local/lib.pm 2014-12-09 21:20:00.000000000 +0100 +++ new/local-lib-2.000018/lib/local/lib.pm 2015-10-29 18:10:32.000000000 +0100 @@ -4,7 +4,7 @@ use warnings; use Config; -our $VERSION = '2.000015'; +our $VERSION = '2.000018'; $VERSION = eval $VERSION; BEGIN { @@ -85,6 +85,15 @@ return _catdir($base, $dir); } +our $_DEVNULL; +sub _devnull { + return $_DEVNULL ||= + _USE_FSPEC ? (require File::Spec, File::Spec->devnull) + : _WIN32 ? 'nul' + : $^O eq 'os2' ? '/dev/nul' + : '/dev/null'; +} + sub import { my ($class, @args) = @_; push @args, @ARGV @@ -92,13 +101,14 @@ my @steps; my %opts; + my %attr; my $shelltype; while (@args) { my $arg = shift @args; # check for lethal dash first to stop processing before causing problems # the fancy dash is U+2212 or \xE2\x88\x92 - if ($arg =~ /\xE2\x88\x92/ or $arg =~ /−/) { + if ($arg =~ /\xE2\x88\x92/) { die <<'DEATH'; WHOA THERE! It looks like you've got some fancy dashes in your commandline! These are *not* the traditional -- dashes that software recognizes. You @@ -134,18 +144,21 @@ elsif ( $arg eq '--no-create' ) { $opts{no_create} = 1; } + elsif ( $arg eq '--quiet' ) { + $attr{quiet} = 1; + } elsif ( $arg =~ /^--/ ) { die "Unknown import argument: $arg"; } else { - push @steps, ['activate', $arg]; + push @steps, ['activate', $arg, \%opts]; } } if (!@steps) { - push @steps, ['activate', undef]; + push @steps, ['activate', undef, \%opts]; } - my $self = $class->new(%opts); + my $self = $class->new(%attr); for (@steps) { my ($method, @args) = @$_; @@ -176,7 +189,7 @@ sub bins { $_[0]->{bins} ||= [ \'PATH' ] } sub roots { $_[0]->{roots} ||= [ \'PERL_LOCAL_LIB_ROOT' ] } sub extra { $_[0]->{extra} ||= {} } -sub no_create { $_[0]->{no_create} } +sub quiet { $_[0]->{quiet} } my $_archname = $Config{archname}; my $_version = $Config{version}; @@ -317,11 +330,12 @@ } sub activate { - my ($self, $path) = @_; + my ($self, $path, $opts) = @_; + $opts ||= {}; $self = $self->new unless ref $self; $path = $self->resolve_path($path); - $self->ensure_dir_structure_for($path) - unless $self->no_create; + $self->ensure_dir_structure_for($path, { quiet => $self->quiet }) + unless $opts->{no_create}; $path = $self->normalize_path($path); @@ -332,7 +346,7 @@ } my %args; - if (!@active_lls || $active_lls[0] ne $path) { + if ($opts->{always} || !@active_lls || $active_lls[0] ne $path) { %args = ( bins => [ $self->install_base_bin_path($path), @{$self->bins} ], libs => [ $self->install_base_perl_path($path), @{$self->libs} ], @@ -354,11 +368,11 @@ } sub build_environment_vars_for { - my $self = $_[0]->new->activate($_[1]); + my $self = $_[0]->new->activate($_[1], { always => 1 }); $self->build_environment_vars; } sub build_activate_environment_vars_for { - my $self = $_[0]->new->activate($_[1]); + my $self = $_[0]->new->activate($_[1], { always => 1 }); $self->build_environment_vars; } sub build_deactivate_environment_vars_for { @@ -418,7 +432,7 @@ } sub environment_vars_string_for { - my $self = $_[0]->new->activate($_[1]); + my $self = $_[0]->new->activate($_[1], { always => 1}); $self->environment_vars_string; } sub environment_vars_string { @@ -478,7 +492,7 @@ sub build_csh_env_declaration { my ($class, $name, $args) = @_; - my ($value, @vars) = $class->_interpolate($args, '${%s}', '"', '"\\%s"'); + my ($value, @vars) = $class->_interpolate($args, '${%s}', qr/["\$]/, '"\\%s"'); if (!defined $value) { return qq{unsetenv $name;\n}; } @@ -516,7 +530,7 @@ sub build_powershell_env_declaration { my ($class, $name, $args) = @_; - my $value = $class->_interpolate($args, '$env:%s', '"', '`%s'); + my $value = $class->_interpolate($args, '$env:%s', qr/["\$]/, '`%s'); if (!$value) { return qq{Remove-Item -ErrorAction 0 Env:\\$name;\n}; @@ -535,12 +549,29 @@ sub build_fish_env_declaration { my ($class, $name, $args) = @_; - my $value = $class->_interpolate($args, '$%s', qr/[\\"' ]/, '\\%s'); + my $value = $class->_interpolate($args, '$%s', qr/[\\"'$ ]/, '\\%s'); if (!defined $value) { return qq{set -e $name;\n}; } - $value =~ s/$_path_sep/ /g; - qq{set -x $name $value;\n}; + + # fish has special handling for PATH, CDPATH, and MANPATH. They are always + # treated as arrays, and joined with ; when storing the environment. Other + # env vars can be arrays, but will be joined without a separator. We only + # really care about PATH, but might as well make this routine more general. + if ($name =~ /^(?:CD|MAN)?PATH$/) { + $value =~ s/$_path_sep/ /g; + my $silent = $name =~ /^(?:CD)?PATH$/ ? " ^"._devnull : ''; + return qq{set -x $name $value$silent;\n}; + } + + my $out = ''; + my $value_without = $value; + if ($value_without =~ s/(?:^|$_path_sep)\$$name(?:$_path_sep|$)//g) { + $out .= qq{set -q $name; and set -x $name $value;\n}; + $out .= qq{set -q $name; or }; + } + $out .= qq{set -x $name $value_without;\n}; + $out; } sub _interpolate { @@ -629,17 +660,33 @@ } sub ensure_dir_structure_for { - my ($class, $path) = @_; - unless (-d $path) { - warn "Attempting to create directory ${path}\n"; - } - require File::Basename; + my ($class, $path, $opts) = @_; + $opts ||= {}; my @dirs; - while(!-d $path) { - push @dirs, $path; - $path = File::Basename::dirname($path); + foreach my $dir ( + $class->lib_paths_for($path), + $class->install_base_bin_path($path), + ) { + my $d = $dir; + while (!-d $d) { + push @dirs, $d; + require File::Basename; + $d = File::Basename::dirname($d); + } + } + + warn "Attempting to create directory ${path}\n" + if !$opts->{quiet} && @dirs; + + my %seen; + foreach my $dir (reverse @dirs) { + next + if $seen{$dir}++; + + mkdir $dir + or -d $dir + or die "Unable to create $dir: $!" } - mkdir $_ for reverse @dirs; return; } @@ -658,7 +705,7 @@ for ($shellbin) { return /csh$/ ? 'csh' - : /fish/ ? 'fish' + : /fish$/ ? 'fish' : /command(?:\.com)?$/i ? 'cmd' : /cmd(?:\.exe)?$/i ? 'cmd' : /4nt(?:\.exe)?$/i ? 'cmd' @@ -701,9 +748,9 @@ PATH="/home/username/perl5/bin:$PATH"; export PATH; PERL_LOCAL_LIB_ROOT="/home/usename/perl5:$PERL_LOCAL_LIB_ROOT"; export PERL_LOCAL_LIB_ROOT; -From a .bashrc file - +From a F<.bash_profile> or F<.bashrc> file - - [ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" + eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" =head2 The bootstrapping technique @@ -757,7 +804,7 @@ any other Bourne shells, you can add this to your shell startup script this way: - echo '[ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >>~/.bashrc + echo 'eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)"' >>~/.bashrc If you are using C shell, you can do this as follows: @@ -770,7 +817,7 @@ give that as import parameter to the call of the local::lib module like this way: - echo '[ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc + echo 'eval "$(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)"' >>~/.bashrc After writing your shell configuration file, be sure to re-read it to get the changed settings into your current shell's environment. Bourne shells use @@ -797,11 +844,13 @@ cd ../mydir2 ... REPEAT ... -When used in a C<.bashrc> file, it is recommended that you protect against -re-activating a directory in a sub-shell. This can be done by checking the -C<$SHLVL> variable as shown in synopsis. Without this, sub-shells created by -the user or other programs will override changes made to the parent shell's -environment. +If you use F<.bashrc> to activate a local::lib automatically, the local::lib +will be re-enabled in any sub-shells used, overriding adjustments you may have +made in the parent shell. To avoid this, you can initialize the local::lib in +F<.bash_profile> rather than F<.bashrc>, or protect the local::lib invocation +with a C<$SHLVL> check: + + [ $SHLVL -eq 1 ] && eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)" If you are working with several C<local::lib> environments, you may want to remove some of them from the current environment without disturbing the others. @@ -969,8 +1018,8 @@ =back -Attempts to create the given path, and all required parent directories. Throws -an exception on failure. +Attempts to create a local::lib directory, including subdirectories and all +required parent directories. Throws an exception on failure. =head2 print_environment_vars_for diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/t/carp-mismatch.t new/local-lib-2.000018/t/carp-mismatch.t --- old/local-lib-2.000015/t/carp-mismatch.t 2014-05-05 21:27:01.000000000 +0200 +++ new/local-lib-2.000018/t/carp-mismatch.t 2015-09-02 12:20:10.000000000 +0200 @@ -32,7 +32,7 @@ close $fh; } -local::lib->import($libdir); +local::lib->import('--no-create', $libdir); require Carp::Foo; is $Carp::Foo::VERSION, '200.0', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/t/classmethod.t new/local-lib-2.000018/t/classmethod.t --- old/local-lib-2.000015/t/classmethod.t 2014-02-24 04:34:19.000000000 +0100 +++ new/local-lib-2.000018/t/classmethod.t 2015-09-02 12:20:10.000000000 +0200 @@ -1,22 +1,30 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 7; use File::Temp; +use File::Spec::Functions qw(catdir); use local::lib (); my $c = 'local::lib'; { - is($c->resolve_empty_path, '~/perl5'); - is($c->resolve_empty_path('foo'), 'foo'); + is $c->resolve_empty_path, '~/perl5', + 'empty path resolves to ~/perl5'; + is $c->resolve_empty_path('foo'), 'foo', + 'defined path resolves to same path'; } { my $warn = ''; local $SIG{__WARN__} = sub { $warn .= $_[0] }; my $dir = File::Temp::tempdir(); - $c->ensure_dir_structure_for("$dir/splat"); - ok(-d "$dir/splat"); - like($warn, qr/^Attempting to create directory/); + my $ll_dir = catdir($dir, 'splat'); + $c->ensure_dir_structure_for($ll_dir); + ok -d $ll_dir, 'base dir created'; + ok -d $c->install_base_bin_path($ll_dir), 'bin dir created'; + ok -d $c->install_base_perl_path($ll_dir), 'lib dir created'; + ok -d $c->install_base_arch_path($ll_dir), 'arch dir created'; + like $warn, qr/^Attempting to create directory/, + 'warning about creation'; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/t/coderefs_in_inc.t new/local-lib-2.000018/t/coderefs_in_inc.t --- old/local-lib-2.000015/t/coderefs_in_inc.t 2014-01-21 00:42:00.000000000 +0100 +++ new/local-lib-2.000018/t/coderefs_in_inc.t 2015-09-02 12:20:10.000000000 +0200 @@ -1,13 +1,13 @@ use strict; use warnings; use Test::More tests => 2; -use File::Temp qw(tempdir); +use lib 't/lib'; +use TempDir; use Cwd; # Test that refs in @INC don't get mangled. - -my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1); +my $dir = mk_temp_dir('test_local_lib-XXXXX'); use local::lib (); my $code = sub {}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/t/de-dup.t new/local-lib-2.000018/t/de-dup.t --- old/local-lib-2.000015/t/de-dup.t 2014-01-21 00:42:00.000000000 +0100 +++ new/local-lib-2.000018/t/de-dup.t 2015-09-02 12:20:10.000000000 +0200 @@ -1,11 +1,11 @@ use strict; use warnings; use Test::More tests => 2; - -use File::Temp qw(tempdir); +use lib 't/lib'; +use TempDir; use Cwd; -my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1); +my $dir = mk_temp_dir('test_local_lib-XXXXX'); use local::lib (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/t/lib/TempDir.pm new/local-lib-2.000018/t/lib/TempDir.pm --- old/local-lib-2.000015/t/lib/TempDir.pm 2014-05-02 08:48:35.000000000 +0200 +++ new/local-lib-2.000018/t/lib/TempDir.pm 2015-09-02 12:20:10.000000000 +0200 @@ -18,14 +18,14 @@ mkdir 't/temp'; my $path = tempdir($name_template, DIR => Cwd::abs_path('t/temp'), CLEANUP => 1); - local::lib->ensure_dir_structure_for($path); + local::lib->ensure_dir_structure_for($path, { quiet => 1 }); # On Win32 the path where the distribution is built usually contains # spaces. This is a problem for some parts of the CPAN toolchain, so # local::lib uses the GetShortPathName trick do get an alternate # representation of the path that doesn't constain spaces. return ($^O eq 'MSWin32') ? Win32::GetShortPathName($path) - : $path + : $path } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/t/shell.t new/local-lib-2.000018/t/shell.t --- old/local-lib-2.000015/t/shell.t 2014-10-28 16:52:08.000000000 +0100 +++ new/local-lib-2.000018/t/shell.t 2015-09-30 17:16:36.000000000 +0200 @@ -141,6 +141,7 @@ "with'squote", 'with\\bslash', 'with%per%cent', + 'with$dollar', ); plan tests => @shells * (@vars * 2 + @strings * 2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/author/cpan-changes.t new/local-lib-2.000018/xt/author/cpan-changes.t --- old/local-lib-2.000015/xt/author/cpan-changes.t 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/xt/author/cpan-changes.t 2015-10-06 01:24:25.000000000 +0200 @@ -0,0 +1,7 @@ +use strict; +use warnings; +use Test::More; +plan tests => 4; + +use Test::CPAN::Changes; +changes_file_ok('Changes'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/author/eol.t new/local-lib-2.000018/xt/author/eol.t --- old/local-lib-2.000015/xt/author/eol.t 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/xt/author/eol.t 2015-09-02 12:20:10.000000000 +0200 @@ -0,0 +1,6 @@ +use strict; +use warnings; +use Test::More; + +use Test::EOL; +all_perl_files_ok({ trailing_whitespace => 1 }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/author/minimum-version.t new/local-lib-2.000018/xt/author/minimum-version.t --- old/local-lib-2.000015/xt/author/minimum-version.t 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/xt/author/minimum-version.t 2015-09-02 12:20:10.000000000 +0200 @@ -0,0 +1,6 @@ +use strict; +use warnings; + +use Perl::MinimumVersion 1.35; +use Test::MinimumVersion; +all_minimum_version_ok( qq{5.006} ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/author/no-tabs.t new/local-lib-2.000018/xt/author/no-tabs.t --- old/local-lib-2.000015/xt/author/no-tabs.t 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/xt/author/no-tabs.t 2015-09-02 12:20:10.000000000 +0200 @@ -0,0 +1,6 @@ +use strict; +use warnings; +use Test::More; + +use Test::NoTabs; +all_perl_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/author/pod-syntax.t new/local-lib-2.000018/xt/author/pod-syntax.t --- old/local-lib-2.000015/xt/author/pod-syntax.t 1970-01-01 01:00:00.000000000 +0100 +++ new/local-lib-2.000018/xt/author/pod-syntax.t 2015-09-02 12:20:10.000000000 +0200 @@ -0,0 +1,6 @@ +use strict; +use warnings; +use Test::More; + +use Test::Pod 1.41; +all_pod_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/bootstrap.t new/local-lib-2.000018/xt/bootstrap.t --- old/local-lib-2.000015/xt/bootstrap.t 2014-04-03 22:55:17.000000000 +0200 +++ new/local-lib-2.000018/xt/bootstrap.t 2015-09-02 12:20:10.000000000 +0200 @@ -1,61 +1,86 @@ use strict; use warnings; -BEGIN { - if (@ARGV && $ARGV[0] eq '--check-version') { - my $module = $ARGV[1]; - (my $file = "$module.pm") =~ s{::}{/}g; - eval { - require $file; - my $version = do { no strict; ${"${module}::VERSION"} }; - print eval $version; - }; - exit; - } -} - -sub check_version { - my ($perl, $module) = @_; - my $version = `$perl $0 --check-version $module`; - chomp $version; - length $version ? $version : undef; -} use Test::More 0.81_01; use IPC::Open3; use File::Temp; use File::Spec; -use Parse::CPAN::Meta; +use File::Path qw(mkpath); +use File::Basename qw(dirname); use local::lib (); +use ExtUtils::MakeMaker; +use Cwd qw(cwd); + +sub check_version { + my ($perl, $module) = @_; + my @inc = `$perl -le "print for \@INC"`; + chomp @inc; + (my $file = "$module.pm") =~ s{::}{/}g; + ($file) = grep -e, map { "$_/$file" } @inc; + return undef + unless $file; + my $version = MM->parse_version($file); + eval $version; +} my @perl; -my $force; +my $verbose; while (@ARGV) { my $arg = shift @ARGV; - if ($arg =~ /^--perl(?:=(.*))$/) { - push @perl, ($1 || shift @ARGV); + if ($arg eq '-v') { + $verbose = 1; } - elsif ($arg eq '-f') { - $force = 1; + elsif ($arg eq '--') { + push @perl, @ARGV; + @ARGV = (); } - else { + elsif ($arg =~ /^-/) { warn "unrecognized option: $arg\n"; } + else { + push @perl, $arg; + } +} + +my $cwd = cwd; +my $tempdir = File::Temp::tempdir('local-lib-source-XXXXX', CLEANUP => 1, TMPDIR => 1); +END { chdir $cwd } + +my @files = qw( + Makefile.PL + lib/local/lib.pm + inc/CPAN.pm + inc/CheckVersion.pm +); +for my $file (@files) { + my $dest = File::Spec->catfile($tempdir, $file); + mkpath(dirname($dest)); + my $content = do { + local $/; + open my $fh, '<:raw', $file + or die "can't read $file $!"; + <$fh>; + }; + $content =~ s{.*do 'maint/Makefile.PL\.include'.*}{}; + open my $fh, '>:raw', $dest + or die "can't write $dest $!"; + print { $fh } $content; + close $fh; } -plan skip_all => 'this test will overwrite Makefile. use -f to force.' - if -e 'Makefile' && !$force; +chdir $tempdir; @perl = $^X unless @perl; my %modules = ( - 'ExtUtils::MakeMaker' => 6.74, - 'ExtUtils::Install' => 1.43, - 'Module::Build' => 0.36, - 'CPAN' => 1.82, + 'ExtUtils::MakeMaker' => '7.00', # version INSTALL_BASE taken as string, not shell + 'ExtUtils::Install' => '1.43', # version INSTALL_BASE was added + 'Module::Build' => '0.36', # PERL_MB_OPT + 'CPAN' => '1.82', # sudo support + CPAN::HandleConfig ); -plan tests => @perl * (1+keys %modules); +plan tests => @perl * (2+2*keys %modules); for my $perl (@perl) { local @INC = @INC; @@ -82,32 +107,53 @@ my $ll = File::Spec->catdir($home, 'local-lib'); + unlink 'MYMETA.yml'; + unlink 'META.yml'; + unlink 'Makefile'; + open my $null_in, '<', File::Spec->devnull; my $pid = open3 $null_in, my $out, undef, $perl, 'Makefile.PL', '--bootstrap='.$ll; while (my $line = <$out>) { - note $line; + note $line + if $verbose || $line =~ /^Running |^\s.* -- (?:NOT OK|OK|NA|TIMED OUT)$/; } waitpid $pid, 0; - is $?, 0, 'Makefile.PL ran successfully' - or diag $out; + is $?, 0, 'Makefile.PL ran successfully'; + + ok -e 'Makefile', 'Makefile created'; - my $meta = Parse::CPAN::Meta->load_file('MYMETA.yml'); + my $prereqs = {}; + open my $fh, '<', 'Makefile' + or die "Unable to open Makefile: $!"; + + while (<$fh>) { + last if /MakeMaker post_initialize section/; + my ($p) = m{^[\#]\s+PREREQ_PM\s+=>\s+(.+)} + or next; + + while ( $p =~ m/(?:\s)([\w\:]+)=>(?:q\[(.*?)\]|undef),?/g ) { + $prereqs->{$1} = $2; + } + } + close $fh; local::lib->setup_env_hash_for($ll); for my $module (sort keys %modules) { - SKIP: { - my $need_version = $meta->{requires}{$module} - or skip "$module not needed for $perl", 1; - my $version = check_version($perl, $module); - if (defined $old_versions{$module}) { - cmp_ok $version, '>=', $modules{$module}, "bootstrap upgraded to new enough $module" - or diag "PERL5LIB: $ENV{PERL5LIB}"; - } - else { - is $version, undef, "bootstrap didn't install new module $module"; - } + my $version = check_version($perl, $module); + my $old_v = $old_versions{$module}; + my $want_v = $modules{$module}; + if (defined $old_v) { + is $prereqs->{$module}, ($old_v >= $want_v ? undef : $want_v), + "prereqs correct for $module"; + cmp_ok $version, '>=', $want_v, "bootstrap upgraded to new enough $module" + or diag "PERL5LIB: $ENV{PERL5LIB}"; + } + else { + ok !exists $prereqs->{$module}, + "$module not listed as prereq"; + is $version, undef, "bootstrap didn't install new module $module"; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/install.t new/local-lib-2.000018/xt/install.t --- old/local-lib-2.000015/xt/install.t 2014-07-26 14:11:26.000000000 +0200 +++ new/local-lib-2.000018/xt/install.t 2015-09-02 12:20:10.000000000 +0200 @@ -67,7 +67,7 @@ my $ll = "$temp/$ll_dir"; mkpath(File::Spec->canonpath($ll)); - local::lib->import($ll); + local::lib->import($ll, '--quiet'); my $dist_dir = mk_temp_dir("source-$dist_type-XXXXX"); chdir $dist_dir; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/release/cpan-changes.t new/local-lib-2.000018/xt/release/cpan-changes.t --- old/local-lib-2.000015/xt/release/cpan-changes.t 2014-03-14 17:03:41.000000000 +0100 +++ new/local-lib-2.000018/xt/release/cpan-changes.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -use strict; -use warnings; -use Test::More; -BEGIN { - plan skip_all => 'Test::CPAN::Changes not available' - if !eval { require Test::CPAN::Changes }; -} -plan tests => 4; - -use Test::CPAN::Changes; -changes_file_ok('Changes'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/release/eol.t new/local-lib-2.000018/xt/release/eol.t --- old/local-lib-2.000015/xt/release/eol.t 2014-01-21 00:42:00.000000000 +0100 +++ new/local-lib-2.000018/xt/release/eol.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -use strict; -use warnings; -use Test::More; - -use Test::EOL; -all_perl_files_ok({ trailing_whitespace => 1 }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/release/kwalitee.t new/local-lib-2.000018/xt/release/kwalitee.t --- old/local-lib-2.000015/xt/release/kwalitee.t 2014-01-21 00:42:00.000000000 +0100 +++ new/local-lib-2.000018/xt/release/kwalitee.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -use strict; -use warnings; -use Test::More; - -BEGIN { - plan skip_all => 'release only test' - unless -f 'META.yml'; -} -use Test::Kwalitee; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/release/minimum-version.t new/local-lib-2.000018/xt/release/minimum-version.t --- old/local-lib-2.000015/xt/release/minimum-version.t 2014-07-25 12:28:40.000000000 +0200 +++ new/local-lib-2.000018/xt/release/minimum-version.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -use strict; -use warnings; - -use Perl::MinimumVersion 1.35; -use Test::MinimumVersion; -all_minimum_version_ok( qq{5.006} ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/release/no-tabs.t new/local-lib-2.000018/xt/release/no-tabs.t --- old/local-lib-2.000015/xt/release/no-tabs.t 2014-01-21 00:42:00.000000000 +0100 +++ new/local-lib-2.000018/xt/release/no-tabs.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -use strict; -use warnings; -use Test::More; - -use Test::NoTabs; -all_perl_files_ok(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/local-lib-2.000015/xt/release/pod-syntax.t new/local-lib-2.000018/xt/release/pod-syntax.t --- old/local-lib-2.000015/xt/release/pod-syntax.t 2014-01-21 00:42:00.000000000 +0100 +++ new/local-lib-2.000018/xt/release/pod-syntax.t 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -use strict; -use warnings; -use Test::More; - -use Test::Pod 1.41; -all_pod_files_ok();
