summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-09-16 11:43:23 +0200
committermkanat%bugzilla.org <>2009-09-16 11:43:23 +0200
commit04ce200f8bf7486de16c3a44e5f34b1a72a91542 (patch)
tree05328d1fd5adbf1ba51e8ed09ce7aa8c1af5c36c
parent540d08b4b84c5d4bb4df362d9bed12da3ac02d24 (diff)
downloadbugzilla-04ce200f8bf7486de16c3a44e5f34b1a72a91542.tar.gz
bugzilla-04ce200f8bf7486de16c3a44e5f34b1a72a91542.tar.xz
Bug 445875: Make it possible to open a CPAN shell with install-module
Patch by Marcus Pallinger <mpal1+bugzilla@ieee.org> r=mkanat, a=mkanat
-rwxr-xr-xinstall-module.pl16
1 files changed, 13 insertions, 3 deletions
diff --git a/install-module.pl b/install-module.pl
index 936618987..241972211 100755
--- a/install-module.pl
+++ b/install-module.pl
@@ -43,7 +43,7 @@ use Pod::Usage;
our %switch;
GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g',
- 'help|h');
+ 'shell', 'help|h');
pod2usage({ -verbose => 1 }) if $switch{'help'};
@@ -58,8 +58,8 @@ pod2usage({ -verbose => 0 }) if (!%switch && !@ARGV);
set_cpan_config($switch{'global'});
if ($switch{'show-config'}) {
- print Dumper($CPAN::Config);
- exit;
+ print Dumper($CPAN::Config);
+ exit;
}
my $can_notest = 1;
@@ -69,6 +69,11 @@ if (substr(CPAN->VERSION, 0, 3) < 1.8) {
print "* You can upgrade CPAN by doing: $^X install-module.pl CPAN\n";
}
+if ($switch{'shell'}) {
+ CPAN::shell();
+ exit;
+}
+
if ($switch{'all'} || $switch{'upgrade-all'}) {
my @modules;
if ($switch{'upgrade-all'}) {
@@ -114,6 +119,7 @@ This script does not run on Windows.
./install-module.pl --all [--global]
./install-module.pl --upgrade-all [--global]
./install-module.pl --show-config
+ ./install-module.pl --shell
Do "./install-module.pl --help" for more information.
@@ -154,6 +160,10 @@ have them installed.
Prints out the CPAN configuration in raw Perl format. Useful for debugging.
+=item B<--shell>
+
+Starts a CPAN shell using the configuration of F<install-module.pl>.
+
=item B<--help>
Shows this help.