r74904 - in /trunk/perlbrew: Changes MANIFEST META.yml Makefile.PL bin/perlbrew debian/changelog debian/control lib/App/perlbrew.pm t/05.get_current_perl.t t/07.argv.t t/installation.t t/mock_perlbrew_root/
ghedo-guest at users.alioth.debian.org
ghedo-guest at users.alioth.debian.org
Fri May 27 16:22:47 UTC 2011
Author: ghedo-guest
Date: Fri May 27 16:22:39 2011
New Revision: 74904
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=74904
Log:
* New upstream release
* Add libpath-class-perl and libtest-excpetion-perl to B-D-I
Added:
trunk/perlbrew/t/07.argv.t
- copied unchanged from r74903, branches/upstream/perlbrew/current/t/07.argv.t
trunk/perlbrew/t/installation.t
- copied unchanged from r74903, branches/upstream/perlbrew/current/t/installation.t
trunk/perlbrew/t/mock_perlbrew_root/
- copied from r74903, branches/upstream/perlbrew/current/t/mock_perlbrew_root/
Modified:
trunk/perlbrew/Changes
trunk/perlbrew/MANIFEST
trunk/perlbrew/META.yml
trunk/perlbrew/Makefile.PL
trunk/perlbrew/bin/perlbrew
trunk/perlbrew/debian/changelog
trunk/perlbrew/debian/control
trunk/perlbrew/lib/App/perlbrew.pm
trunk/perlbrew/t/05.get_current_perl.t
Modified: trunk/perlbrew/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/Changes?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/Changes (original)
+++ trunk/perlbrew/Changes Fri May 27 16:22:39 2011
@@ -1,3 +1,9 @@
+0.22:
+- Fix ccache support on Linux with bash.. GH #87.
+- `install` command no longer clobbers existing installations.
+- New commands: uninstall, alias, self-upgrade
+- See more on http://perlbrew.pl/Release-0.22.html
+
0.21:
- oylenshpeegul++ Let version numbers alone mean installation names. For example, 5.12.3 means perl-5.12.3
- audreyt++ fixed `perlbrew install <URL>` that might installs to a wrong path.
Modified: trunk/perlbrew/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/MANIFEST?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/MANIFEST (original)
+++ trunk/perlbrew/MANIFEST Fri May 27 16:22:39 2011
@@ -26,3 +26,7 @@
t/04.test_uniq.t
t/05.get_current_perl.t
t/06.installed_perls.t
+t/07.argv.t
+t/installation.t
+t/mock_perlbrew_root/perls/perl-5.14.0/bin/perl
+t/mock_perlbrew_root/perls/the-dude/bin/perl
Modified: trunk/perlbrew/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/META.yml?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/META.yml (original)
+++ trunk/perlbrew/META.yml Fri May 27 16:22:39 2011
@@ -4,6 +4,8 @@
- 'Kang-min Liu C<< <gugod at gugod.org> >>'
build_requires:
ExtUtils::MakeMaker: 6.42
+ Path::Class: 0
+ Test::Exception: 0
Test::More: 0
Test::Output: 0
Test::Simple: 0
@@ -28,4 +30,4 @@
resources:
license: http://opensource.org/licenses/mit-license.php
repository: git://github.com/gugod/App-perlbrew.git
-version: 0.21
+version: 0.22
Modified: trunk/perlbrew/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/Makefile.PL?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/Makefile.PL (original)
+++ trunk/perlbrew/Makefile.PL Fri May 27 16:22:39 2011
@@ -54,6 +54,8 @@
test_requires 'Test::Simple';
test_requires 'Test::More';
test_requires 'Test::Output';
+test_requires 'Test::Exception';
+test_requires 'Path::Class';
install_script 'bin/perlbrew';
Modified: trunk/perlbrew/bin/perlbrew
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/bin/perlbrew?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/bin/perlbrew (original)
+++ trunk/perlbrew/bin/perlbrew Fri May 27 16:22:39 2011
@@ -19,6 +19,7 @@
Commonly used commands:
init Initialize perlbrew environment.
install Install perl
+ uninstall Uninstall the given installation
list List installed perls
use Use the specified perl in current shell
available List perls available to install
@@ -39,6 +40,7 @@
perlbrew switch /path/to/special/perl
perlbrew switch /path/to/special/perl special-perl
+
# later
perlbrew switch special-perl
@@ -91,6 +93,10 @@
Build and install from the given URL. Supported URL schemes are C<http://>,
C<https://>, C<ftp://> and C<file://>.
+
+=item B<uninstall> <target>
+
+Uninstalls the given version.
=item B<mirror>
@@ -126,6 +132,17 @@
Without a parameter, shows the version of perl currently selected.
+=item B<alias> [-f] create <name> <alias>
+
+Create an alias for the installation named <name>.
+
+=item B<alias> [-f] rename <old_alias> <new_alias>
+
+Rename the alias to a new name.
+
+=item B<alias> delete <alias>
+
+Delete the given alias.
=item B<off>
@@ -196,6 +213,9 @@
Install the C<cpanm> standalone executable in C<$PERLBREW_ROOT/bin>.
+=item B<self-upgrade>
+
+This command upgrades Perlbrew to its latest version.
=item B<version>
Modified: trunk/perlbrew/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/debian/changelog?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/debian/changelog (original)
+++ trunk/perlbrew/debian/changelog Fri May 27 16:22:39 2011
@@ -1,3 +1,10 @@
+perlbrew (0.22-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * Add libpath-class-perl and libtest-excpetion-perl to B-D-I
+
+ -- Alessandro Ghedini <al3xbio at gmail.com> Fri, 27 May 2011 18:19:03 +0200
+
perlbrew (0.21-1) unstable; urgency=low
[ Alessandro Ghedini ]
Modified: trunk/perlbrew/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/debian/control?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/debian/control (original)
+++ trunk/perlbrew/debian/control Fri May 27 16:22:39 2011
@@ -4,6 +4,8 @@
Build-Depends: debhelper (>= 8)
Build-Depends-Indep: perl,
libdevel-patchperl-perl,
+ libpath-class-perl,
+ libtest-excpetion-perl,
libtest-output-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Alessandro Ghedini <al3xbio at gmail.com>
Modified: trunk/perlbrew/lib/App/perlbrew.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/lib/App/perlbrew.pm?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/lib/App/perlbrew.pm (original)
+++ trunk/perlbrew/lib/App/perlbrew.pm Fri May 27 16:22:39 2011
@@ -5,7 +5,7 @@
use Getopt::Long ();
use File::Spec::Functions qw( catfile );
-our $VERSION = "0.21";
+our $VERSION = "0.22";
our $CONF;
my $ROOT = $ENV{PERLBREW_ROOT} || "$ENV{HOME}/perl5/perlbrew";
@@ -100,7 +100,7 @@
;;
(*)
- command perlbrew $short_option $*
+ command perlbrew $short_option "$@"
exit_status=$?
;;
esac
@@ -638,6 +638,11 @@
unless ($dist) {
$self->run_command_install_perlbrew();
return
+ }
+
+ my $installation_name = $self->{as} || $dist;
+ if ($self->is_installed( $installation_name )) {
+ die "\nABORT: $installation_name is already installed.\n\n";
}
my $help_message = "Unknown installation target \"$dist\", abort.\nPlease see `perlbrew help` for the instruction on using the install command.\n\n";
@@ -791,14 +796,14 @@
my @result;
for (<$ROOT/perls/*>) {
- next if m/current/;
my ($name) = $_ =~ m/\/([^\/]+$)/;
my $executable = catfile($_, 'bin', 'perl');
push @result, {
name => $name,
version => $self->format_perl_version(`$executable -e 'print \$]'`),
- is_current => (current_perl eq $name)
+ is_current => (current_perl eq $name),
+ is_external => 0
};
}
@@ -812,11 +817,18 @@
push @result, {
name => $_,
version => $current_perl_executable_version,
- is_current => $current_perl_executable && ($_ eq $current_perl_executable)
+ is_current => $current_perl_executable && ($_ eq $current_perl_executable),
+ is_external => 1
} unless index($_, $ROOT) == 0;
}
return @result;
+}
+
+sub is_installed {
+ my ($self, $name) = @_;
+ my @installed = grep { !$_->{is_external} } $self->installed_perls;
+ return grep { $name eq $_->{name} } @installed;
}
# Return a hash of PERLBREW_* variables
@@ -1019,6 +1031,41 @@
print "cpanm is installed to $ROOT/bin/cpanm\n" if $self->{verbose};
}
+sub run_command_self_upgrade {
+ my ($self) = @_;
+
+ my $perlbrew_install = http_get('http://xrl.us/perlbrewinstall');
+ open my $fh, '>', '/tmp/perlbrewinstall';
+ print $fh $perlbrew_install;
+ close $fh;
+ exec 'bash', '/tmp/perlbrewinstall';
+}
+
+sub run_command_uninstall {
+ my ( $self, $target ) = @_;
+
+ unless($target) {
+ die <<USAGE
+
+Usage: perlbrew uninstall <name>
+
+ The name is the installation name as in the output of `perlbrew list`
+
+USAGE
+ }
+
+ my $dir = "$ROOT/perls/$target";
+
+ 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";
+ }
+
+ unless(-d $dir) {
+ die "'$target' is not installed\n";
+ }
+ exec 'rm', '-rf', $dir;
+}
+
sub run_command_exec {
my ($self, @args) = @_;
@@ -1052,6 +1099,65 @@
}
print "\nDone\n";
+}
+
+sub run_command_alias {
+ my ($self, $cmd, $name, $alias) = @_;
+
+ if (!$cmd) {
+ print <<USAGE;
+
+Usage: perlbrew alias [-f] <action> <name> [<alias>]
+
+ perlbrew alias create <name> <alias>
+ perlbrew alias delete <alias>
+ perlbrew alias rename <old_alias> <new_alias>
+
+USAGE
+ return;
+ }
+
+ unless ( $self->is_installed($name) ) {
+ die "\nABORT: The installation `${name}` does not exist.\n\n";
+ }
+
+ my $path_name = catfile($ROOT, "perls", $name);
+ my $path_alias = catfile($ROOT, "perls", $alias) if $alias;
+
+ if ($alias && -e $path_alias && !-l $path_alias) {
+ die "\nABORT: The installation name `$alias` is not an alias, cannot override.\n\n";
+ }
+
+ if ($cmd eq 'create') {
+ if ( $self->is_installed($alias) && !$self->{force} ) {
+ die "\nABORT: The installation `${alias}` already exists. Cannot override.\n\n";
+ }
+
+
+ unlink($path_alias) if -e $path_alias;
+ symlink($path_name, $path_alias);
+ }
+ elsif($cmd eq 'delete') {
+ unless (-l $path_name) {
+ die "\nABORT: The installation name `$name` is not an alias, cannot remove.\n\n";
+ }
+
+ unlink($path_name);
+ }
+ elsif($cmd eq 'rename') {
+ unless (-l $path_name) {
+ die "\nABORT: The installation name `$name` is not an alias, cannot rename.\n\n";
+ }
+
+ if (-l $path_alias && !$self->{force}) {
+ die "\nABORT: The alias `$alias` already exists, cannot rename to it.\n\n";
+ }
+
+ rename($path_name, $path_alias);
+ }
+ else {
+ die "\nERROR: Unrecognized action: `${cmd}`.\n\n";
+ }
}
sub conf {
Modified: trunk/perlbrew/t/05.get_current_perl.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/t/05.get_current_perl.t?rev=74904&op=diff
==============================================================================
--- trunk/perlbrew/t/05.get_current_perl.t (original)
+++ trunk/perlbrew/t/05.get_current_perl.t Fri May 27 16:22:39 2011
@@ -7,11 +7,12 @@
use Test::Output;
my $app = App::perlbrew->new();
+my $version = $App::perlbrew::VERSION;
stdout_is(
sub {
$app->run_command('version');
},
- "t/05.get_current_perl.t - App::perlbrew/0.21\n",
+ "t/05.get_current_perl.t - App::perlbrew/$version\n",
'Test version'
);
More information about the Pkg-perl-cvs-commits
mailing list