Hello community, here is the log from the commit of package perl-App-perlbrew for openSUSE:Factory checked in at 2016-04-12 19:33:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-App-perlbrew (Old) and /work/SRC/openSUSE:Factory/.perl-App-perlbrew.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-App-perlbrew" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-App-perlbrew/perl-App-perlbrew.changes 2015-12-03 13:31:00.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-App-perlbrew.new/perl-App-perlbrew.changes 2016-04-12 19:33:04.000000000 +0200 @@ -1,0 +2,14 @@ +Mon Apr 4 09:14:05 UTC 2016 - [email protected] + +- updated to 0.75 + see /usr/share/doc/packages/perl-App-perlbrew/Changes + + 0.75: # 2016-03-16T23:41:41+0100 + - Thanks to our contributors: Dave Cross, Dean Hamstead, Mark J. Reed, Mohammed El-Afifi, + - Add '--no-patchperl' install option for skip running patchperl. + - Add '--destdir' install option. + - "uninstall" command now also delete associated libs. + - "mirror" command is removed. + - "config" command is removed. + +------------------------------------------------------------------- Old: ---- App-perlbrew-0.74.tar.gz New: ---- App-perlbrew-0.75.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-App-perlbrew.spec ++++++ --- /var/tmp/diff_new_pack.kUxbnK/_old 2016-04-12 19:33:05.000000000 +0200 +++ /var/tmp/diff_new_pack.kUxbnK/_new 2016-04-12 19:33:05.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-App-perlbrew # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-App-perlbrew -Version: 0.74 +Version: 0.75 Release: 0 %define cpan_name App-perlbrew Summary: Manage perl installations in your C<$HOME> @@ -58,23 +58,11 @@ # MANUAL END %description -perlbrew is a program to automate the building and installation of perl in -an easy way. It provides multiple isolated perl environments, and a -mechanism for you to switch between them. - -Everything are installed unter '~/perl5/perlbrew'. You then need to include -a bashrc/cshrc provided by perlbrew to tweak the PATH for you. You then can -benefit from not having to run 'sudo' commands to install cpan modules -because those are installed inside your HOME too. - -For the documentation of perlbrew usage see the perlbrew manpage command on -CPAN, or by running 'perlbrew help'. The following documentation features -the API of 'App::perlbrew' module, and may not be remotely close to what -your want to read. +Manage perl installations in your C<$HOME> %prep %setup -q -n %{cpan_name}-%{version} -find . -type f -print0 | xargs -0 chmod 644 +find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 %build %{__perl} Makefile.PL INSTALLDIRS=vendor ++++++ App-perlbrew-0.74.tar.gz -> App-perlbrew-0.75.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/Changes new/App-perlbrew-0.75/Changes --- old/App-perlbrew-0.74/Changes 2015-11-24 21:17:25.000000000 +0100 +++ new/App-perlbrew-0.75/Changes 2016-03-16 23:51:16.000000000 +0100 @@ -1,3 +1,11 @@ +0.75: # 2016-03-16T23:41:41+0100 +- Thanks to our contributors: Dave Cross, Dean Hamstead, Mark J. Reed, Mohammed El-Afifi, +- Add '--no-patchperl' install option for skip running patchperl. +- Add '--destdir' install option. +- "uninstall" command now also delete associated libs. +- "mirror" command is removed. +- "config" command is removed. + 0.74: # 2015-11-24T20:55:02+0100 - A big thanks for our contributers: Aristotle Pagaltzis, Dave Jacoby, Dylan Cali, John Krull, Kevin Johnson, Nathan Day, Paul Cochrane, Tudor Constantin, Yanick Champoux, tm604 - support PERLBREW_LIB_PREFIX. https://github.com/gugod/App-perlbrew/commit/c29813cd4633683bd049964178a9ac96647986bc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/LICENSE new/App-perlbrew-0.75/LICENSE --- old/App-perlbrew-0.74/LICENSE 2015-02-01 10:09:41.000000000 +0100 +++ new/App-perlbrew-0.75/LICENSE 2016-03-16 23:51:06.000000000 +0100 @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2010,2011,2012,2013 Kang-min Liu +Copyright (c) 2010-2016 Kang-min Liu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/MANIFEST new/App-perlbrew-0.75/MANIFEST --- old/App-perlbrew-0.74/MANIFEST 2015-11-24 21:16:07.000000000 +0100 +++ new/App-perlbrew-0.75/MANIFEST 2016-03-16 23:50:28.000000000 +0100 @@ -37,6 +37,7 @@ t/10.resolve.t t/11.editdist.t t/11.root_from_arg.t +t/12.destdir.t t/12.sitecustomize.t t/13.perl_release.t t/14.perl_version_parsing.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/META.yml new/App-perlbrew-0.75/META.yml --- old/App-perlbrew-0.74/META.yml 2015-11-24 21:19:01.000000000 +0100 +++ new/App-perlbrew-0.75/META.yml 2016-03-16 23:52:14.000000000 +0100 @@ -1,5 +1,5 @@ --- -abstract: ~ +abstract: 'App::perlbrew - Manage perl installations in your $HOME' author: - 'Kang-min Liu C<< <[email protected]> >>' build_requires: @@ -39,4 +39,4 @@ resources: license: http://opensource.org/licenses/mit-license.php repository: git://github.com/gugod/App-perlbrew.git -version: '0.74' +version: '0.75' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/Makefile.PL new/App-perlbrew-0.75/Makefile.PL --- old/App-perlbrew-0.74/Makefile.PL 2015-11-24 21:17:25.000000000 +0100 +++ new/App-perlbrew-0.75/Makefile.PL 2016-03-16 23:51:06.000000000 +0100 @@ -4,6 +4,8 @@ all_from 'lib/App/perlbrew.pm'; +abstract 'App::perlbrew - Manage perl installations in your $HOME'; + repository 'git://github.com/gugod/App-perlbrew.git'; requires diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/README new/App-perlbrew-0.75/README --- old/App-perlbrew-0.74/README 2015-11-24 21:17:25.000000000 +0100 +++ new/App-perlbrew-0.75/README 2016-03-16 23:51:06.000000000 +0100 @@ -1,236 +1,171 @@ -Name: - App::perlbrew - Manage perl installations in your $HOME +# NAME - Synopsis: - # Installation - curl -L http://install.perlbrew.pl | bash - - # Initialize - perlbrew init - - # Pick a preferred CPAN mirror - perlbrew mirror - - # See what is available - perlbrew available - - # Install some Perls - perlbrew install 5.18.2 - perlbrew install perl-5.8.1 - perlbrew install perl-5.19.9 - - # See what were installed - perlbrew list - - # Swith to an installation and set it as default - perlbrew switch perl-5.18.2 - - # Temporarily use another version only in current shell. - perlbrew use perl-5.8.1 - perl -v - - # Or turn it off completely. Useful when you messed up too deep. - # Or want to go back to the system Perl. - perlbrew off - - # Use 'switch' command to turn it back on. - perlbrew switch perl-5.12.2 - - # Exec something with all perlbrew-ed perls - perlbrew exec -- perl -E 'say $]' - - Description: - perlbrew is a program to automate the building and installation of perl - in an easy way. It provides multiple isolated perl environments, and a - mechanism for you to switch between them. - - Everything are installed unter "~/perl5/perlbrew". You then need to - include a bashrc/cshrc provided by perlbrew to tweak the PATH for you. - You then can benefit from not having to run "sudo" commands to install - cpan modules because those are installed inside your "HOME" too. - - For the documentation of perlbrew usage see perlbrew command on MetaCPAN - <https://metacpan.org/>, or by running "perlbrew help", or by visiting - perlbrew's official website <http://perlbrew.pl/>. The following - documentation features the API of "App::perlbrew" module, and may not be - remotely close to what your want to read. - - Installation: - It is the simplest to use the perlbrew installer, just paste this - statement to your terminal: - - curl -L http://install.perlbrew.pl | bash - - Or this one, if you have "fetch" (default on FreeBSD): - - fetch -o- http://install.perlbrew.pl | sh - - After that, "perlbrew" installs itself to "~/perl5/perlbrew/bin", and - you should follow the instruction on screen to modify your shell rc file - to put it in your PATH. - - The installed perlbrew command is a standalone executable that can be - run with system perl. The minimum system perl version requirement is - 5.8.0, which should be good enough for most of the OSes these days. - - A fat-packed version of patchperl is also installed to - "~/perl5/perlbrew/bin", which is required to build old perls. - - The directory "~/perl5/perlbrew" will contain all install perl - executables, libraries, documentations, lib, site_libs. In the - documentation, that directory is referred as "perlbrew root". If you - need to set it to somewhere else because, say, your "HOME" has limited - quota, you can do that by setting "PERLBREW_ROOT" environment variable - before running the installer: - - export PERLBREW_ROOT=/opt/perl5 - curl -L http://install.perlbrew.pl | bash - - As a result, different users on the same machine can all share the same - perlbrew root directory (although only original user that made the - installation would have the permission to perform perl installations.) - - You may also install perlbrew from CPAN: - - cpan App::perlbrew - - In this case, the perlbrew command is installed as "/usr/bin/perlbrew" - or "/usr/local/bin/perlbrew" or others, depending on the location of - your system perl installation. - - Please make sure not to run this with one of the perls brewed with - perlbrew. It's the best to turn perlbrew off before you run that, if - you're upgrading. - - perlbrew off - cpan App::perlbrew - - You should always use system cpan (like /usr/bin/cpan) to install - "App::perlbrew" because it will be installed under a system PATH like - "/usr/bin", which is not affected by perlbrew "switch" or "use" command. - - The "self-upgrade" command will not upgrade the perlbrew installed by - cpan command, but it is also easy to upgrade perlbrew by running "cpan - App::perlbrew" again. - - Methods: - (Str) current_perl - Return the "current perl" object attribute string, or, if absent, - the value of "PERLBREW_PERL" environment variable. - - (Str) current_perl (Str) - Set the "current_perl" object attribute to the given value. - - Project Development: - perlbrew project <http://perlbrew.pl/> uses github - <http://github.com/gugod/App-perlbrew/issues> and RT - <https://rt.cpan.org/Dist/Display.html?Queue=App-perlbrew> for issue - tracking. Issues sent to these two systems will eventually be reviewed - and handled. - - See <https://github.com/gugod/App-perlbrew/contributors> for a list of - project contributors. - -Configuration: - PERLBREW_ROOT - By default, perlbrew builds and installs perls into - "$ENV{HOME}/perl5/perlbrew" directory. To use a different directory, - set this environment variable in your "bashrc" to the directory in - your shell RC before sourcing perlbrew's RC. - - It is possible to share one perlbrew root with multiple user account - on the same machine. Therefore people do not have to install the - same version of perl over an over. Let's say "/opt/perl5" is the - directory we want to share. All users should be able append this - snippet to their bashrc to make it effective: - - export PERLBREW_ROOT=/opt/perl5 - source ${PERLBREW_ROOT}/etc/bashrc - - After doing so, everyone's PATH should include "/opt/perl5/bin" and - "/opt/perl5/perls/${PERLBREW_PERL}/bin". Each user can invoke - "perlbrew switch" and "perlbrew use" to independently switch to - different perl environment of their choice. However, only the user - with write permission to $PERLBREW_ROOT may install CPAN modules. - This is both good and bad depending on the working convention of - your team. - - If you wish to install CPAN modules only for yourself, you should - use the "lib" command to construct a personal local::lib - environment. local::lib environments are personal, and are not - shared between different users. For more detail, read "perlbrew help - lib" and the documentation of local::lib. - - If you want even a cooler module isolation and wish to install CPAN - modules used for just one project, you should use carton for this - purpose. - - It is also possible to set this variable before installing perlbrew - to make perlbrew install itself under the given PERLBREW_ROOT: - - export PERLBREW_ROOT=/opt/perl5 - curl -kL http://install.perlbrew.pl | bash - - After doing this, the perlbrew executable is installed as - "/opt/perl5/bin/perlbrew" - - PERLBREW_HOME - By default, perlbrew stores per-user setting to - "$ENV{HOME}/.perlbrew" directory. To use a different directory, set - this environment variable in your shell RC before sourcing - perlbrew's RC. - - In some cases, say, your home directory is on NFS and shared across - multiple machines, you may wish to have several different perlbrew - setting per-machine. To do so, you can use the "PERLBREW_HOME" - environment variable to tell perlbrew where to look for the - initialization file. Here's a brief bash snippet for the given - scenario. - - if [ "$(hostname)" == "machine-a" ]; then - export PERLBREW_HOME=~/.perlbrew-a - elif [ "$(hostname)" == "machine-b" ]; then - export PERLBREW_HOME=~/.perlbrew-b - fi - - source ~/perl5/perlbrew/etc/bashrc - - PERLBREW_CONFIGURE_FLAGS - This environment variable specify the list of command like flags to - pass through to 'sh Configure'. By default it is '-de'. - - PERLBREW_CPAN_MIRROR - The CPAN mirror url of your choice. - -Author: - Kang-min Liu "<[email protected]>" - -Copyright: - Copyright (c) 2010,2011,2012,2013,2014,2015 Kang-min Liu - "<[email protected]>". - - Licence: - The MIT License - - Disclaimer of Warranty: - BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY - FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN - OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES - PROVIDE THE SOFTWARE "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 SOFTWARE IS WITH - YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL - NECESSARY SERVICING, REPAIR, OR CORRECTION. - - 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 SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE - TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE - SOFTWARE (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 SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF - SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. +[App::perlbrew](https://metacpan.org/pod/App::perlbrew) - Manage perl installations in your `$HOME` +## SYNOPSIS + + # Installation + curl -L http://install.perlbrew.pl | bash + + # Initialize + perlbrew init + + # See what is available + perlbrew available + + # Install some Perls + perlbrew install 5.18.2 + perlbrew install perl-5.8.1 + perlbrew install perl-5.19.9 + + # See what were installed + perlbrew list + + # Swith to an installation and set it as default + perlbrew switch perl-5.18.2 + + # Temporarily use another version only in current shell. + perlbrew use perl-5.8.1 + perl -v + + # Or turn it off completely. Useful when you messed up too deep. + # Or want to go back to the system Perl. + perlbrew off + + # Use 'switch' command to turn it back on. + perlbrew switch perl-5.12.2 + + # Exec something with all perlbrew-ed perls + perlbrew exec -- perl -E 'say $]' + +## DESCRIPTION + +[perlbrew](https://metacpan.org/pod/perlbrew) is a program to automate the building and installation of perl in an +easy way. It provides multiple isolated perl environments, and a mechanism +for you to switch between them. + +Everything are installed unter `~/perl5/perlbrew`. You then need to include a +bashrc/cshrc provided by perlbrew to tweak the PATH for you. You then can +benefit from not having to run `sudo` commands to install +cpan modules because those are installed inside your `HOME` too. + +For the documentation of perlbrew usage see [perlbrew](https://metacpan.org/pod/perlbrew) command +on [MetaCPAN](https://metacpan.org/), or by running `perlbrew help`, +or by visiting [perlbrew's official website](http://perlbrew.pl/). The following documentation +features the API of `App::perlbrew` module, and may not be remotely +close to what your want to read. + +## INSTALLATION + +It is the simplest to use the perlbrew installer, just paste this statement to +your terminal: + + curl -L http://install.perlbrew.pl | bash + +Or this one, if you have `fetch` (default on FreeBSD): + + fetch -o- http://install.perlbrew.pl | sh + +After that, `perlbrew` installs itself to `~/perl5/perlbrew/bin`, and you +should follow the instruction on screen to modify your shell rc file to put it +in your PATH. + +The installed perlbrew command is a standalone executable that can be run with +system perl. The minimum system perl version requirement is 5.8.0, which should +be good enough for most of the OSes these days. + +A fat-packed version of [patchperl](https://metacpan.org/pod/patchperl) is also installed to +`~/perl5/perlbrew/bin`, which is required to build old perls. + +The directory `~/perl5/perlbrew` will contain all install perl executables, +libraries, documentations, lib, site\_libs. In the documentation, that directory +is referred as `perlbrew root`. If you need to set it to somewhere else because, +say, your `HOME` has limited quota, you can do that by setting `PERLBREW_ROOT` +environment variable before running the installer: + + export PERLBREW_ROOT=/opt/perl5 + curl -L http://install.perlbrew.pl | bash + +As a result, different users on the same machine can all share the same perlbrew +root directory (although only original user that made the installation would +have the permission to perform perl installations.) + +You may also install perlbrew from CPAN: + + cpan App::perlbrew + +In this case, the perlbrew command is installed as `/usr/bin/perlbrew` or +`/usr/local/bin/perlbrew` or others, depending on the location of your system +perl installation. + +Please make sure not to run this with one of the perls brewed with +perlbrew. It's the best to turn perlbrew off before you run that, if you're +upgrading. + + perlbrew off + cpan App::perlbrew + +You should always use system cpan (like /usr/bin/cpan) to install +`App::perlbrew` because it will be installed under a system PATH like +`/usr/bin`, which is not affected by perlbrew `switch` or `use` command. + +The `self-upgrade` command will not upgrade the perlbrew installed by cpan +command, but it is also easy to upgrade perlbrew by running `cpan App::perlbrew` +again. + +## METHODS + +- (Str) current\_perl + + Return the "current perl" object attribute string, or, if absent, the value of + `PERLBREW_PERL` environment variable. + +- (Str) current\_perl (Str) + + Set the `current_perl` object attribute to the given value. + +## PROJECT DEVELOPMENT + +[perlbrew project](http://perlbrew.pl/) uses github +[http://github.com/gugod/App-perlbrew/issues](http://github.com/gugod/App-perlbrew/issues) and RT +<https://rt.cpan.org/Dist/Display.html?Queue=App-perlbrew> for issue +tracking. Issues sent to these two systems will eventually be reviewed +and handled. + +See [https://github.com/gugod/App-perlbrew/contributors](https://github.com/gugod/App-perlbrew/contributors) for a list +of project contributors. + +# AUTHOR + +Kang-min Liu `<[email protected]>` + +# COPYRIGHT + +Copyright (c) 2010-2016 Kang-min Liu `<[email protected]>`. + +### LICENCE + +The MIT License + +## DISCLAIMER OF WARRANTY + +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE SOFTWARE "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 SOFTWARE IS WITH +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL +NECESSARY SERVICING, REPAIR, OR CORRECTION. + +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 SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE +THE SOFTWARE (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 SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/README.md new/App-perlbrew-0.75/README.md --- old/App-perlbrew-0.74/README.md 2015-11-24 21:17:25.000000000 +0100 +++ new/App-perlbrew-0.75/README.md 2016-03-16 23:51:06.000000000 +0100 @@ -10,9 +10,6 @@ # Initialize perlbrew init - # Pick a preferred CPAN mirror - perlbrew mirror - # See what is available perlbrew available @@ -53,7 +50,7 @@ cpan modules because those are installed inside your `HOME` too. For the documentation of perlbrew usage see [perlbrew](https://metacpan.org/pod/perlbrew) command -on [MetaCPAN](https://metacpan.org/), or by running `perlbrew help`, +on [MetaCPAN](https://metacpan.org/), or by running `perlbrew help`, or by visiting [perlbrew's official website](http://perlbrew.pl/). The following documentation features the API of `App::perlbrew` module, and may not be remotely close to what your want to read. @@ -144,7 +141,7 @@ # COPYRIGHT -Copyright (c) 2010,2011,2012,2013,2014,2015 Kang-min Liu `<[email protected]>`. +Copyright (c) 2010-2016 Kang-min Liu `<[email protected]>`. ### LICENCE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/bin/perlbrew new/App-perlbrew-0.75/bin/perlbrew --- old/App-perlbrew-0.74/bin/perlbrew 2015-11-24 21:17:25.000000000 +0100 +++ new/App-perlbrew-0.75/bin/perlbrew 2016-03-16 23:51:06.000000000 +0100 @@ -96,7 +96,7 @@ to make perlbrew install itself under the given PERLBREW_ROOT: export PERLBREW_ROOT=/opt/perl5 - curl -kL http://install.perlbrew.pl | bash + curl -L http://install.perlbrew.pl | bash After doing this, the perlbrew executable is installed as C</opt/perl5/bin/perlbrew> @@ -127,7 +127,7 @@ =item PERLBREW_CPAN_MIRROR -The CPAN mirror url of your choice. +The CPAN mirror url of your choice. The default value is "http://www.cpan.org" =back @@ -226,9 +226,14 @@ --ld Build perl with uselongdouble enabled --debug Build perl with DEBUGGING enabled --clang Build perl using the clang compiler + --no-patchperl + Skip calling patchperl -D,-U,-A Switches passed to perl Configure script. - ex. C<perlbrew install perl-5.10.1 -D usemymalloc -U uselargefiles> + ex. C<perlbrew install perl-5.10.1 -D usemymalloc -U versiononly> + + --destdir $path + Install perl as per 'make install DESTDIR=$path' --sitecustomize $filename Specify a file to be installed as sitecustomize.pl @@ -290,7 +295,8 @@ Usage: perlbrew uninstall <name> Uninstalls the given perl installation. The name is the installation name as in -the output of `perlbrew list` +the output of `perlbrew list`. This effectively deletes the specified perl installation, +and all libs associated with it. =head1 COMMAND: USE @@ -497,7 +503,7 @@ be used by the perlbrew installer. However, you could manually do the following to re-install only the C<perlbrew> executable: - curl -kL http://get.perlbrew.pl -o perlbrew + curl https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew -o perlbrew perl ./perlbrew self-install It is slightly different from running the perlbrew installer because diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/doc/MIT-LICENSE new/App-perlbrew-0.75/doc/MIT-LICENSE --- old/App-perlbrew-0.74/doc/MIT-LICENSE 2015-02-01 10:09:41.000000000 +0100 +++ new/App-perlbrew-0.75/doc/MIT-LICENSE 2016-03-16 23:51:06.000000000 +0100 @@ -1,6 +1,6 @@ -The MIT License +nThe MIT License -Copyright (c) 2010 Kang-mil Liu +Copyright (c) 2010-2016 Kang-mil Liu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/lib/App/perlbrew.pm new/App-perlbrew-0.75/lib/App/perlbrew.pm --- old/App-perlbrew-0.74/lib/App/perlbrew.pm 2015-11-24 21:17:25.000000000 +0100 +++ new/App-perlbrew-0.75/lib/App/perlbrew.pm 2016-03-16 23:51:16.000000000 +0100 @@ -2,7 +2,7 @@ use strict; use warnings; use 5.008; -our $VERSION = "0.74"; +our $VERSION = "0.75"; use Config; BEGIN { @@ -19,7 +19,7 @@ @INC = @oldinc; } -use File::Glob ':glob'; +use File::Glob 'bsd_glob'; use Getopt::Long (); sub min(@) { @@ -142,7 +142,7 @@ fetch => { test => '--version >/dev/null 2>&1', get => '-o - {url}', - download => '{url}', + download => '-o {output} {url}', order => 3, } ); @@ -281,10 +281,11 @@ U => [], A => [], sitecustomize => '', + destdir => '', noman => '', variation => '', both => [], - append => '', + append => '', ); $opt{$_} = '' for keys %flavor; @@ -324,9 +325,9 @@ return Getopt::Long::GetOptions( $params, - 'force|f!', - 'notest|n!', - 'quiet|q!', + 'force|f', + 'notest|n', + 'quiet|q', 'verbose|v', 'as=s', 'append=s', @@ -336,6 +337,7 @@ 'switch', 'all', 'shell=s', + 'no-patchperl', # options passed directly to Configure 'D=s@', @@ -345,6 +347,7 @@ 'j=i', # options that affect Configure and customize post-build 'sitecustomize=s', + 'destdir=s', 'noman', # flavors support @@ -367,6 +370,16 @@ return $self->{root} || $PERLBREW_ROOT; } +sub home { + my ($self, $new_home) = @_; + + if (defined($new_home)) { + $self->{home} = $new_home; + } + + return $self->{home} || $PERLBREW_HOME; +} + sub current_perl { my ($self, $v) = @_; $self->{current_perl} = $v if $v; @@ -704,13 +717,15 @@ sub perl_release { my ($self, $version) = @_; + my $mirror = $self->cpan_mirror(); + # try src/5.0 symlinks, either perl-5.X or perl5.X; favor .tar.bz2 over .tar.gz my $index = http_get("http://www.cpan.org/src/5.0/"); if ($index) { for my $prefix ( "perl-", "perl" ){ for my $suffix ( ".tar.bz2", ".tar.gz" ) { my $dist_tarball = "$prefix$version$suffix"; - my $dist_tarball_url = $self->cpan_mirror() . "/src/5.0/$dist_tarball"; + my $dist_tarball_url = "$mirror/src/5.0/$dist_tarball"; return ( $dist_tarball, $dist_tarball_url ) if ( $index =~ /href\s*=\s*"\Q$dist_tarball\E"/ms ); } @@ -725,14 +740,11 @@ if ($x) { my $dist_tarball = (split("/", $x))[-1]; - my $dist_tarball_url = $self->cpan_mirror() . "/authors/id/$x"; + my $dist_tarball_url = "$mirror/authors/id/$x"; return ($dist_tarball, $dist_tarball_url); } - # try to find it on search.cpan.org - my $mirror = $self->config->{mirror}; - my $header = $mirror ? { 'Cookie' => "cpan=$mirror->{url}" } : undef; - my $html = http_get("http://search.cpan.org/dist/perl-${version}", $header); + my $html = http_get("http://search.cpan.org/dist/perl-${version}", { 'Cookie' => "cpan=$mirror" }); unless ($html) { die "ERROR: Failed to locate perl-${version} tarball."; @@ -808,10 +820,10 @@ } my $root_dir = $self->path_with_tilde($self->root); - my $pb_home_dir = $self->path_with_tilde($PERLBREW_HOME); + my $pb_home_dir = $self->path_with_tilde($self->home); my $code = qq( source $root_dir/etc/${shrc}); - if ($PERLBREW_HOME ne joinpath($self->env('HOME'), ".perlbrew")) { + if ($self->home ne joinpath($self->env('HOME'), ".perlbrew")) { $code = " export PERLBREW_HOME=$pb_home_dir\n" . $code; } @@ -1212,7 +1224,7 @@ sub purify { my ($self, $envname) = @_; - my @paths = grep { index($_, $PERLBREW_HOME) < 0 && index($_, $self->root) < 0 } split /:/, $self->env($envname); + my @paths = grep { index($_, $self->home) < 0 && index($_, $self->root) < 0 } split /:/, $self->env($envname); return wantarray ? @paths : join(":", @paths); } @@ -1293,6 +1305,7 @@ my @u_options = @{ $self->{U} }; my @a_options = @{ $self->{A} }; my $sitecustomize = $self->{sitecustomize}; + my $destdir = $self->{destdir}; $installation_name = $self->{as} if $self->{as}; $installation_name .= "$variation$append"; @@ -1312,8 +1325,8 @@ $self->{$flavor} and push @d_options, $flavor{$flavor}{d_option} } - my $perlpath = $self->root . "/perls/$installation_name"; - my $patchperl = $self->root . "/bin/patchperl"; + my $perlpath = joinpath($self->root, "perls", $installation_name); + my $patchperl = joinpath($self->root, "bin", "patchperl"); unless (-x $patchperl && -f _) { $patchperl = "patchperl"; @@ -1343,8 +1356,8 @@ my @preconfigure_commands = ( "cd $dist_extracted_dir", "rm -f config.sh Policy.sh", - $patchperl, ); + push @preconfigure_commands, $patchperl unless $self->{"no-patchperl"}; my $configure_flags = $self->env("PERLBREW_CONFIGURE_FLAGS") || '-de'; @@ -1376,7 +1389,9 @@ local $ENV{TEST_JOBS}=$self->{j} if $test_target eq "test_harness" && ($self->{j}||1) > 1; - my @install_commands = $self->{notest} ? "make install" : ("make $test_target", "make install"); + my @install_commands = ("make install" . ($destdir ? " DESTDIR=$destdir" : q||)); + unshift @install_commands, "make $test_target" unless $self->{notest}; + # Whats happening here? we optionally join with && based on $self->{force}, but then subsequently join with && anyway? @install_commands = join " && ", @install_commands unless($self->{force}); my $cmd = join " && ", @@ -1396,7 +1411,7 @@ $cmd = "($cmd) >> '$self->{log_file}' 2>&1 "; } - delete $ENV{$_} for qw(PERL5LIB PERL5OPT); + delete $ENV{$_} for qw(PERL5LIB PERL5OPT AWKPATH); if ($self->do_system($cmd)) { my $newperl = joinpath($self->root, "perls", $installation_name, "bin", "perl"); @@ -1408,7 +1423,11 @@ if ( $sitecustomize ) { my $capture = $self->do_capture("$newperl -V:sitelib"); - my ($sitelib) = $capture =~ /sitelib='(.*)';/; + my ($sitelib) = $capture =~ m/sitelib='([^']*)';/; + # This should probably all use File::Path + if ($destdir) { + $sitelib = $destdir . $sitelib + } mkpath($sitelib) unless -d $sitelib; my $target = "$sitelib/sitecustomize.pl"; open my $dst, ">", $target @@ -1438,7 +1457,7 @@ sub do_install_program_from_url { my ($self, $url, $program_name, $body_filter) = @_; - my $out = $self->root . "/bin/" . $program_name; + my $out = joinpath($self->root, "bin", $program_name); if (-f $out && !$self->{force}) { require ExtUtils::MakeMaker; @@ -1518,10 +1537,10 @@ my @result; my $root = $self->root; - for (<$root/perls/*>) { - my ($name) = $_ =~ m/\/([^\/]+$)/; - my $executable = joinpath($_, 'bin', 'perl'); - my $version_file = joinpath($_,'.version'); + for my $installation_dir (<$root/perls/*>) { + my ($name) = $installation_dir =~ m/\/([^\/]+$)/; + my $executable = joinpath($installation_dir, 'bin', 'perl'); + my $version_file = joinpath($installation_dir,'.version'); my $orig_version; if ( -e $version_file ){ open my $fh, '<', $version_file; @@ -1543,7 +1562,8 @@ version => $self->format_perl_version($orig_version), is_current => ($self->current_perl eq $name) && !($self->current_lib), libs => [ $self->local_libs($name) ], - executable => $executable + executable => $executable, + dir => $installation_dir, }; } @@ -1553,24 +1573,21 @@ sub local_libs { my ($self, $perl_name) = @_; - my @libs = map { substr($_, length($PERLBREW_HOME) + 6) } bsd_glob("$PERLBREW_HOME/libs/*"); - - if ($perl_name) { - @libs = grep { /^$perl_name\@/ } @libs; - } - my $current = $self->current_perl . '@' . ($self->env("PERLBREW_LIB") || ''); - - @libs = map { - my ($p, $l) = split(/@/, $_); - + my @libs = map { + my $name = substr($_, length($self->home) + 6); + my ($p, $l) = split(/@/, $name); +{ - name => $_, - is_current => $_ eq $current, + name => $name, + is_current => $name eq $current, perl_name => $p, - lib_name => $l + lib_name => $l, + dir => $_, } - } @libs; + } bsd_glob(joinpath($self->home, "libs", "*")); + if ($perl_name) { + @libs = grep { $perl_name eq $_->{perl_name} } @libs; + } return @libs; } @@ -1611,10 +1628,11 @@ ); require local::lib; + my $pb_home = $self->home; my $current_local_lib_root = $self->env("PERL_LOCAL_LIB_ROOT") || ""; my $current_local_lib_context = local::lib->new; - my @perlbrew_local_lib_root = uniq(grep { /\Q${PERLBREW_HOME}\E/ } split(/:/, $current_local_lib_root)); - if ($current_local_lib_root =~ /^\Q$PERLBREW_HOME\E/) { + my @perlbrew_local_lib_root = uniq(grep { /\Q${pb_home}\E/ } split(/:/, $current_local_lib_root)); + if ($current_local_lib_root =~ /^\Q${pb_home}\E/) { $current_local_lib_context = $current_local_lib_context->activate($_) for @perlbrew_local_lib_root; } @@ -1628,7 +1646,7 @@ if ($lib_name) { $current_local_lib_context = $current_local_lib_context->deactivate($_) for @perlbrew_local_lib_root; - my $base = "$PERLBREW_HOME/libs/${perl_name}\@${lib_name}"; + my $base = joinpath($self->home, "libs", "${perl_name}\@${lib_name}"); if (-d $base) { $current_local_lib_context = $current_local_lib_context->activate($base); @@ -1784,7 +1802,7 @@ if ($self->env("PERLBREW_BASHRC_VERSION")) { local $ENV{PERLBREW_PERL} = $dist; my $HOME = $self->env('HOME'); - my $pb_home = $self->env("PERLBREW_HOME") || $PERLBREW_HOME; + my $pb_home = $self->home; mkpath($pb_home); system("$0 env $dist > " . joinpath($pb_home, "init")); @@ -1803,7 +1821,7 @@ sub run_command_switch_off { my $self = shift; - my $pb_home = $self->env("PERLBREW_HOME") || $PERLBREW_HOME; + my $pb_home = $self->home; mkpath($pb_home); system("env PERLBREW_PERL= $0 env > " . joinpath($pb_home, "init")); @@ -1896,7 +1914,7 @@ die "Your perlbrew installation appears to be system-wide. Please upgrade through your package manager.\n"; } - http_get('http://get.perlbrew.pl', undef, sub { + http_get('https://raw.githubusercontent.com/gugod/App-perlbrew/master/perlbrew', undef, sub { my ( $body ) = @_; open my $fh, '>', $TMP_PERLBREW or die "Unable to write perlbrew: $!"; @@ -1928,16 +1946,21 @@ exit(-1); } - my $dir = "@{[ $self->root ]}/perls/$target"; + my @installed = $self->installed_perls(@_); + + my ($to_delete) = grep { $_->{name} eq $target } @installed; + + die "'$target' is not installed\n" unless $to_delete; - if (-l $dir) { - die "\nThe given name `$target` is an alias, not a real installation. Cannot perform uninstall.\nTo delete the alias, run:\n\n perlbrew alias delete $target\n\n"; + my @dir_to_delete; + for (@{$to_delete->{libs}}) { + push @dir_to_delete, $_->{dir}; } + push @dir_to_delete, $to_delete->{dir}; - unless(-d $dir) { - die "'$target' is not installed\n"; + for (@dir_to_delete) { + rmpath($_); } - exec 'rm', '-rf', $dir; } sub run_command_exec { @@ -1976,7 +1999,7 @@ my $overall_success = 1; for my $i ( @exec_with ) { - next if -l $self->root . '/perls/' . $i->{name}; # Skip Aliases + next if -l joinpath($self->root, 'perls', $i->{name}); # Skip Aliases my %env = $self->perlbrew_env($i->{name}); next if !$env{PERLBREW_PERL}; @@ -2129,7 +2152,7 @@ } my $fullname = $perl_name . '@' . $lib_name; - my $dir = joinpath($PERLBREW_HOME, "libs", $fullname); + my $dir = joinpath($self->home, "libs", $fullname); if (-d $dir) { die "$fullname is already there.\n"; @@ -2156,7 +2179,7 @@ my $current = $self->current_perl . '@' . $self->current_lib; - my $dir = joinpath($PERLBREW_HOME, "libs", $fullname); + my $dir = joinpath($self->home, "libs", $fullname); if (-d $dir) { @@ -2178,7 +2201,7 @@ sub run_command_lib_list { my ($self) = @_; - my $dir = joinpath($PERLBREW_HOME, "libs"); + my $dir = joinpath($self->home, "libs"); return unless -d $dir; opendir my $dh, $dir or die "open $dir failed: $!"; @@ -2247,7 +2270,7 @@ $value_wo_D =~ s/^-D//; push @{$self->{D}} , $value_wo_D if grep {/$value/} @d_options; } - + $self->do_install_release($dist, $dist_version); } @@ -2323,49 +2346,6 @@ print $self->format_info_output(@_); } - -sub config { - my($self) = @_; - $self->_load_config if ! $CONFIG; - return $CONFIG; -} - -sub config_file { - my ($self) = @_; - joinpath( $self->root, 'Config.pm' ); -} - -sub _save_config { - my($self) = @_; - require Data::Dumper; - open my $FH, '>', $self->config_file or die "Unable to open config (@{[ $self->config_file ]}): $!"; - my $d = Data::Dumper->new([$CONFIG],['App::perlbrew::CONFIG']); - print $FH $d->Dump; - close $FH; -} - -sub _load_config { - my($self) = @_; - - if ( ! -e $self->config_file ) { - local $CONFIG = {} if ! $CONFIG; - $self->_save_config; - } - - open my $FH, '<', $self->config_file or die "Unable to open config (@{[ $self->config_file ]}): $!\n"; - my $raw = do { local $/; my $rv = <$FH>; $rv }; - close $FH; - - my $rv = eval $raw; - if ( $@ ) { - warn "Error loading conf: $@\n"; - $CONFIG = {}; - return; - } - $CONFIG = {} if ! $CONFIG; - return; -} - sub BASHRC_CONTENT() { return "export PERLBREW_BASHRC_VERSION=$VERSION\n" . (exists $ENV{PERLBREW_ROOT} ? "export PERLBREW_ROOT=$PERLBREW_ROOT\n" : "") . "\n" . <<'RC'; @@ -2868,9 +2848,6 @@ # Initialize perlbrew init - # Pick a preferred CPAN mirror - perlbrew mirror - # See what is available perlbrew available @@ -2911,7 +2888,7 @@ cpan modules because those are installed inside your C<HOME> too. For the documentation of perlbrew usage see L<perlbrew> command -on L<MetaCPAN|https://metacpan.org/>, or by running C<perlbrew help>, +on L<MetaCPAN|https://metacpan.org/>, or by running C<perlbrew help>, or by visiting L<perlbrew's official website|http://perlbrew.pl/>. The following documentation features the API of C<App::perlbrew> module, and may not be remotely close to what your want to read. @@ -3006,7 +2983,7 @@ =head1 COPYRIGHT -Copyright (c) 2010,2011,2012,2013,2014,2015 Kang-min Liu C<< <[email protected]> >>. +Copyright (c) 2010-2016 Kang-min Liu C<< <[email protected]> >>. =head3 LICENCE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/App-perlbrew-0.74/t/12.destdir.t new/App-perlbrew-0.75/t/12.destdir.t --- old/App-perlbrew-0.74/t/12.destdir.t 1970-01-01 01:00:00.000000000 +0100 +++ new/App-perlbrew-0.75/t/12.destdir.t 2016-03-16 23:51:06.000000000 +0100 @@ -0,0 +1,109 @@ +#!perl +use strict; +use Path::Class; +use Capture::Tiny qw/capture/; +use IO::All; +use App::perlbrew; +use File::Temp qw( tempdir ); + +$App::perlbrew::PERLBREW_ROOT = tempdir( CLEANUP => 1 ); +$App::perlbrew::PERLBREW_HOME = tempdir( CLEANUP => 1 ); +$ENV{PERLBREW_ROOT} = $App::perlbrew::PERLBREW_ROOT; +my $DESTDIR = tempdir( CLEANUP => 1 ); + +use Test::More; + +## setup + +App::perlbrew::rmpath( $ENV{PERLBREW_ROOT} ); + +## mock + +no warnings 'redefine'; + +sub App::perlbrew::do_system { + my ($self, $cmd) = @_; + if ($cmd =~ /sitelib/) { + print "sitelib='$ENV{PERLBREW_ROOT}/perls/perl-5.14.2/lib/site_perl/5.14.2';\n"; + print "installprefix='$ENV{PERLBREW_ROOT}/perls/perl-5.14.2';\n"; + print "installstyle='lib';\n"; + return 1; + } + elsif ($cmd =~ /Configure/) { + # pretend to succeed + return 1; + } + else { + # fail to run + $? = 1<<8; + $! = "Could not run '$cmd'"; + return 0; + } +} + +sub App::perlbrew::do_install_release { + my ($self, $dist) = @_; + my ($dist_name, $dist_version) = $dist =~ m/^(.*)-([\d.]+(?:-RC\d+)?)$/; + + my $name = $dist; + $name = $self->{as} if $self->{as}; + + my $root = dir($DESTDIR, $ENV{PERLBREW_ROOT}); + my $installation_dir = $root->subdir("perls", $name); + App::perlbrew::mkpath($installation_dir); + App::perlbrew::mkpath($root->subdir("perls", $name, "bin")); + + my $perl = $root->subdir("perls", $name, "bin")->file("perl"); + io($perl)->print("#!/bin/sh\nperl \"\$@\";\n"); + chmod 0755, $perl; + + # fake the install + $self->do_install_this("/tmp/fake-src/perl-5.14.2", $dist_version, $dist); +} + +use warnings; + +## main + +note "PERLBREW_ROOT set to $ENV{PERLBREW_ROOT}"; +note "DESTDIR set to $DESTDIR"; + +subtest "No perls yet installed" => sub { + my $app = App::perlbrew->new; + my @installed = grep { !$_->{is_external} } $app->installed_perls; + is 0+@installed, 0, "no perls installed"; +}; + +subtest "--destdir option can be set" => sub { + my $app = App::perlbrew->new('install', 'perl-5.14.2', + '--destdir=/tmp/foo' + ); + + is join(' ', $app->args), join(' ', qw(install perl-5.14.2)), "post-option args correct"; + is $app->{destdir}, '/tmp/foo', '--destdir set as expected'; +}; + +subtest "mock installing" => sub { + my $sitefile = File::Temp->new; + print $sitefile "use strict;\n"; + close $sitefile; + my $app = App::perlbrew->new('install', 'perl-5.14.2', + "--destdir=$DESTDIR", "--sitecustomize=$sitefile" + ); + my ($output,$error) = capture { $app->run }; + + my @installed = grep { !$_->{is_external} } $app->installed_perls; +use Data::Dumper; print Dumper \@installed; + is 0+@installed, 0, "found 0 installed perl (as it's installed in DESTDIR)"; + + my $root = dir($DESTDIR, $ENV{PERLBREW_ROOT}); + my $perldir = $root->subdir("perls", "perl-5.14.2"); + my $installedsite = $perldir->file('lib', 'site_perl', '5.14.2', 'sitecustomize.pl'); + ok( -f $installedsite, "sitecustomize.pl installed in DESTDIR" ); + + my $guts = do { local (@ARGV, $/) = $installedsite; <> }; + is( $guts, "use strict;\n", "sitecustomize.pl contents correct in DESTDIR" ); +}; + +done_testing; +# vim: ts=4 sts=4 sw=4 et:
