Commit 04ce200f authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

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
parent 540d08b4
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment