Move CPANPLUS from lib/ to ext/
[p5sagit/p5-mst-13.2.git] / ext / CPANPLUS / bin / cpanp
CommitLineData
6aaee015 1#!/usr/bin/perl
2# $File: //depot/cpanplus/dist/bin/cpanp $
3# $Revision: #8 $ $Change: 8345 $ $DateTime: 2003/10/05 19:25:48 $
4
5use strict;
6use vars '$VERSION';
7
8use CPANPLUS;
9$VERSION = CPANPLUS->VERSION;
10
11use CPANPLUS::Shell qw[Default];
12my $shell = CPANPLUS::Shell->new;
13
14### if we're given a command, run it; otherwise, open a shell.
15if (@ARGV) {
16 ### take the command line arguments as a command
17 my $input = "@ARGV";
18 ### if they said "--help", fix it up to work.
19 $input = 'h' if $input =~ /^\s*--?h(?:elp)?\s*$/i;
20 ### strip the leading dash
21 $input =~ s/^\s*-//;
22 ### pass the command line to the shell
a3de5d0b 23 ### exit with a useful return value on return
24 exit not $shell->dispatch_on_input(input => $input, noninteractive => 1);
6aaee015 25} else {
26 ### open a shell for the user
27 $shell->shell();
28}
29
30=head1 NAME
31
32cpanp - The CPANPLUS launcher
33
34=head1 SYNOPSIS
35
36B<cpanp>
37
38B<cpanp> S<[-]B<a>> S<[ --[B<no>-]I<option>... ]> S< I<author>... >
39
40B<cpanp> S<[-]B<mfitulrcz>> S<[ --[B<no>-]I<option>... ]> S< I<module>... >
41
42B<cpanp> S<[-]B<d>> S<[ --[B<no>-]I<option>... ]> S<[ --B<fetchdir>=... ]> S< I<module>... >
43
44B<cpanp> S<[-]B<xb>> S<[ --[B<no>-]I<option>... ]>
45
46B<cpanp> S<[-]B<o>> S<[ --[B<no>-]I<option>... ]> S<[ I<module>... ]>
47
48=head1 DESCRIPTION
49
50This script launches the B<CPANPLUS> utility to perform various operations
51from the command line. If it's invoked without arguments, an interactive
52shell is executed by default.
53
54Optionally, it can take a single-letter switch and one or more argument,
55to perform the associated action on each arguments. A summary of the
56available commands is listed below; C<cpanp -h> provides a detailed list.
57
58 h # help information
59 v # version information
60
61 a AUTHOR ... # search by author(s)
62 m MODULE ... # search by module(s)
63 f MODULE ... # list all releases of a module
64
65 i MODULE ... # install module(s)
66 t MODULE ... # test module(s)
67 u MODULE ... # uninstall module(s)
68 d MODULE ... # download module(s)
69 l MODULE ... # display detailed information about module(s)
70 r MODULE ... # display README files of module(s)
71 c MODULE ... # check for module report(s) from cpan-testers
72 z MODULE ... # extract module(s) and open command prompt in it
73
74 x # reload CPAN indices
75
76 o [ MODULE ... ] # list installed module(s) that aren't up to date
77 b # write a bundle file for your configuration
78
79Each command may be followed by one or more I<options>. If preceded by C<no>,
80the corresponding option will be set to C<0>, otherwise it's set to C<1>.
81
82Example: To skip a module's tests,
83
84 cpanp -i --skiptest MODULE ...
85
86Valid options for most commands are C<cpantest>, C<debug>, C<flush>, C<force>,
87C<prereqs>, C<storable>, C<verbose>, C<md5>, C<signature>, and C<skiptest>; the
88'd' command also accepts C<fetchdir>. Please consult L<CPANPLUS::Configure>
89for an explanation to their meanings.
90
91Example: To download a module's tarball to the current directory,
92
93 cpanp -d --fetchdir=. MODULE ...
94
95=cut
96
971;
98
99# Local variables:
100# c-indentation-style: bsd
101# c-basic-offset: 4
102# indent-tabs-mode: nil
103# End:
104# vim: expandtab shiftwidth=4: