summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.