r74983 - in /trunk/perlbrew: Changes META.yml Makefile.PL debian/changelog debian/control lib/App/perlbrew.pm t/installation.t

ghedo-guest at users.alioth.debian.org ghedo-guest at users.alioth.debian.org
Tue May 31 17:32:36 UTC 2011


Author: ghedo-guest
Date: Tue May 31 17:32:29 2011
New Revision: 74983

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=74983
Log:
* New upstream release
* Remove libtry-tiny-perl from B-D-I

Modified:
    trunk/perlbrew/Changes
    trunk/perlbrew/META.yml
    trunk/perlbrew/Makefile.PL
    trunk/perlbrew/debian/changelog
    trunk/perlbrew/debian/control
    trunk/perlbrew/lib/App/perlbrew.pm
    trunk/perlbrew/t/installation.t

Modified: trunk/perlbrew/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/Changes?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/Changes (original)
+++ trunk/perlbrew/Changes Tue May 31 17:32:29 2011
@@ -1,3 +1,9 @@
+0.23:
+- dependency fixes
+- Fix auto-detection of curl
+- Support OpenBSD pdksh. The provided bashrc should be compatible with pdksh.
+- Small improvement of 'exec' command. `perlbrew exec perl -v` now works.
+
 0.22:
 - Fix ccache support on Linux with bash.. GH #87.
 - `install` command no longer clobbers existing installations.

Modified: trunk/perlbrew/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/META.yml?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/META.yml (original)
+++ trunk/perlbrew/META.yml Tue May 31 17:32:29 2011
@@ -4,6 +4,7 @@
   - 'Kang-min Liu  C<< <gugod at gugod.org> >>'
 build_requires:
   ExtUtils::MakeMaker: 6.42
+  IO::All: 0
   Path::Class: 0
   Test::Exception: 0
   Test::More: 0
@@ -30,4 +31,4 @@
 resources:
   license: http://opensource.org/licenses/mit-license.php
   repository: git://github.com/gugod/App-perlbrew.git
-version: 0.22
+version: 0.23

Modified: trunk/perlbrew/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/Makefile.PL?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/Makefile.PL (original)
+++ trunk/perlbrew/Makefile.PL Tue May 31 17:32:29 2011
@@ -56,6 +56,7 @@
 test_requires 'Test::Output';
 test_requires 'Test::Exception';
 test_requires 'Path::Class';
+test_requires 'IO::All';
 
 install_script 'bin/perlbrew';
 

Modified: trunk/perlbrew/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/debian/changelog?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/debian/changelog (original)
+++ trunk/perlbrew/debian/changelog Tue May 31 17:32:29 2011
@@ -1,3 +1,10 @@
+perlbrew (0.23-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Remove libtry-tiny-perl from B-D-I
+
+ -- Alessandro Ghedini <al3xbio at gmail.com>  Tue, 31 May 2011 19:30:17 +0200
+
 perlbrew (0.22-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/perlbrew/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/debian/control?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/debian/control (original)
+++ trunk/perlbrew/debian/control Tue May 31 17:32:29 2011
@@ -7,8 +7,7 @@
  libio-all-perl,
  libpath-class-perl,
  libtest-exception-perl,
- libtest-output-perl,
- libtry-tiny-perl
+ libtest-output-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Alessandro Ghedini <al3xbio at gmail.com>
 Standards-Version: 3.9.2

Modified: trunk/perlbrew/lib/App/perlbrew.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/lib/App/perlbrew.pm?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/lib/App/perlbrew.pm (original)
+++ trunk/perlbrew/lib/App/perlbrew.pm Tue May 31 17:32:29 2011
@@ -5,10 +5,11 @@
 use Getopt::Long ();
 use File::Spec::Functions qw( catfile );
 
-our $VERSION = "0.22";
+our $VERSION = "0.23";
 our $CONF;
 
 my $ROOT         = $ENV{PERLBREW_ROOT} || "$ENV{HOME}/perl5/perlbrew";
+my $PB_HOME      = $ENV{PERLBREW_HOME} || "$ENV{HOME}/.perlbrew";
 my $CONF_FILE    = catfile( $ROOT, 'Conf.pm' );
 my $CURRENT_PERL = $ENV{PERLBREW_PERL};
 
@@ -16,24 +17,28 @@
 
 sub BASHRC_CONTENT() {
     return <<'RC';
-if [[ -f $HOME/.perlbrew/init ]]; then
-    source $HOME/.perlbrew/init
+if [[ -z "$PERLBREW_HOME" ]]; then
+    export PERLBREW_HOME=$HOME/.perlbrew
 fi
 
+if [[ -f $PERLBREW_HOME/init ]]; then
+    . $PERLBREW_HOME/init
+fi
+
 __perlbrew_reinit () {
-    if [[ ! -d $HOME/.perlbrew ]]; then
-        mkdir -p $HOME/.perlbrew
+    if [[ ! -d $PERLBREW_HOME ]]; then
+        mkdir -p $PERLBREW_HOME
     fi
 
-    echo '# DO NOT EDIT THIS FILE' >| $HOME/.perlbrew/init
-    command perlbrew env $1 >> $HOME/.perlbrew/init
-    source $HOME/.perlbrew/init
+    echo '# DO NOT EDIT THIS FILE' >| $PERLBREW_HOME/init
+    command perlbrew env $1 >> $PERLBREW_HOME/init
+    . $PERLBREW_HOME/init
     __perlbrew_set_path
 }
 
 __perlbrew_set_path () {
     [[ -z "$PERLBREW_ROOT" ]] && return 1
-    hash -d perl 2>/dev/null
+    unalias perl 2>/dev/null
     export PATH_WITHOUT_PERLBREW=$(perl -e 'print join ":", grep { index($_, $ENV{PERLBREW_ROOT}) } split/:/,$ENV{PATH};')
     export PATH=$PERLBREW_PATH:$PATH_WITHOUT_PERLBREW
 }
@@ -195,7 +200,8 @@
             );
             for my $command (@commands) {
                 my $program = $command->[0];
-                if (! system("$program --version >/dev/null 2>&1")) {
+                my $code = system("$program --version >/dev/null 2>&1") >> 8;
+                if ($code != 127) {
                     @command = @$command;
                     last;
                 }
@@ -225,6 +231,7 @@
     my($class, @argv) = @_;
 
     my %opt = (
+        original_argv  => \@argv,
         force => 0,
         quiet => 1,
         D => [],
@@ -261,14 +268,14 @@
     )
       or run_command_help(1);
 
+    $opt{args} = \@ARGV;
+
     # fix up the effect of 'bundling'
     foreach my $flags (@opt{qw(D U A)}) {
         foreach my $value(@{$flags}) {
             $value =~ s/^=//;
         }
     }
-
-    $opt{args} = \@ARGV;
 
     return bless \%opt, $class;
 }
@@ -395,7 +402,7 @@
     my $HOME = $self->env('HOME');
 
     mkpath($_) for (
-        "$HOME/.perlbrew",
+        "$PB_HOME",
         "$ROOT/perls", "$ROOT/dists", "$ROOT/build", "$ROOT/etc",
         "$ROOT/bin"
     );
@@ -418,20 +425,28 @@
         $shrc = $yourshrc = 'bashrc';
     }
 
-    system("$0 env @{[ $self->current_perl ]}> ${HOME}/.perlbrew/init");
+    system("$0 env @{[ $self->current_perl ]}> ${PB_HOME}/init");
 
     $self->run_command_symlink_executables;
 
     my $root_dir = $self->path_with_tilde($ROOT);
+    my $pb_home_dir = $self->path_with_tilde($PB_HOME);
 
     print <<INSTRUCTION;
 Perlbrew environment initiated, required directories are created under
 
     $root_dir
 
-Paste the following line to the end of your ~/.${yourshrc} and start a
+Paste the following line(s) to the end of your ~/.${yourshrc} and start a
 new shell, perlbrew should be up and fully functional from there:
 
+INSTRUCTION
+
+    if ($PB_HOME ne "$ENV{HOME}/.perlbrew") {
+        print "export PERLBREW_HOME=$pb_home_dir\n";
+    }
+
+    print <<INSTRUCTION;
     source $root_dir/etc/${shrc}
 
 For further instructions, simply run `perlbrew` to see the help message.
@@ -993,7 +1008,7 @@
 
     my %env = $self->perlbrew_env($perl);
 
-    if ($self->env('SHELL') =~ /(ba|z|\/)sh$/) {
+    if ($self->env('SHELL') =~ /(ba|k|z|\/)sh$/) {
         while (my ($k, $v) = each(%env)) {
             print "export $k=$v\n";
         }
@@ -1067,7 +1082,9 @@
 }
 
 sub run_command_exec {
-    my ($self, @args) = @_;
+    my $self = shift;
+    my @args = @{$self->{original_argv}};
+    shift @args;
 
     for my $i ( $self->installed_perls ) {
         my %env = $self->perlbrew_env($i->{name});
@@ -1262,7 +1279,7 @@
 first. C<perlbrew> depends on one of this two external commmands to be
 there in order to fetch files from the internet.
 
-The recommended way to install perlbrew is to run these statements in
+The recommended way to install perlbrew is to run this statement in
 your shell:
 
     curl -L http://xrl.us/perlbrewinstall | bash
@@ -1286,6 +1303,33 @@
 
     export PERLBREW_ROOT=/opt/perlbrew
     curl -L http://xrl.us/perlbrewinstall | bash
+
+By default, C<perlbrew> looks for the intialization file that exports
+C<PERLBREW_ROOT> in C<~/.perlbrew/init>.  In some cases (for instance,
+if your home directory is shared across multiple machines), you may
+wish to have several different perlbrew setting per-machine. If so,
+you can use the C<PERLBREW_HOME> environment variable to tell perlbrew
+where to look for the initialization file.
+
+ # on machine a
+ $ PERLBREW_HOME=~/.perlbrew-a PERLBREW_ROOT=~/perl5/perlbrew-a ./perlbrew install
+
+ # on machine b
+ $ PERLBREW_HOME=~/.perlbrew-b PERLBREW_ROOT=~/perl5/perlbrew-b ./perlbrew install
+
+If you specify C<PERLBREW_HOME>, you will also need to specify both
+C<PERLBREW_HOME> and C<PERLBREW_ROOT> when you first install perlbrew.
+After that, you'll need to make sure C<PERLBREW_HOME> is exported when
+you log in, before you source C<$PERLBREW_ROOT/etc/bashrc> (or
+C<cshrc>). Example C<.bashrc>:
+
+    if [ "$(hostname)" == "machine-a" ]; then
+        export PERLBREW_HOME=~/.perlbrew-a
+        source ~/perl5/perlbrew-a/etc/bashrc
+    elif [ "$(hostname)" == "machine-b" ]; then
+        export PERLBREW_HOME=~/.perlbrew-b
+        source ~/perl5/perlbrew-b/etc/bashrc
+    fi
 
 You may also install perlbrew from CPAN:
 

Modified: trunk/perlbrew/t/installation.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/t/installation.t?rev=74983&op=diff
==============================================================================
--- trunk/perlbrew/t/installation.t (original)
+++ trunk/perlbrew/t/installation.t Tue May 31 17:32:29 2011
@@ -10,7 +10,6 @@
 use Test::More;
 use Test::Exception;
 use App::perlbrew;
-use Try::Tiny;
 
 ## setup
 




More information about the Pkg-perl-cvs-commits mailing list