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