Debian Codegraph @

bin/cpanp

raw
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 ### exit with a useful return value on return
24 exit not $shell->dispatch_on_input(input => $input, noninteractive => 1);
25 } else {
26 ### open a shell for the user
27 $shell->shell();
28 }
29
30 =head1 NAME
31
32 cpanp - The CPANPLUS launcher
33
34 =head1 SYNOPSIS
35
36 B<cpanp>
37
38 B<cpanp> S<[-]B<a>> S<[ --[B<no>-]I<option>... ]> S< I<author>... >
39
40 B<cpanp> S<[-]B<mfitulrcz>> S<[ --[B<no>-]I<option>... ]> S< I<module>... >
41
42 B<cpanp> S<[-]B<d>> S<[ --[B<no>-]I<option>... ]> S<[ --B<fetchdir>=... ]> S< I<module>... >
43
44 B<cpanp> S<[-]B<xb>> S<[ --[B<no>-]I<option>... ]>
45
46 B<cpanp> S<[-]B<o>> S<[ --[B<no>-]I<option>... ]> S<[ I<module>... ]>
47
48 =head1 DESCRIPTION
49
50 This script launches the B<CPANPLUS> utility to perform various operations
51 from the command line. If it's invoked without arguments, an interactive
52 shell is executed by default.
53
54 Optionally, it can take a single-letter switch and one or more arguments,
55 to perform the associated action on each argument. A summary of the
56 available 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
79 Each command may be followed by one or more I<options>. If preceded by C<no>,
80 the corresponding option will be set to C<0>, otherwise it's set to C<1>.
81
82 Example: To skip a module's tests,
83
84 cpanp -i --skiptest MODULE ...
85
86 Valid options for most commands are C<cpantest>, C<debug>, C<flush>, C<force>,
87 C<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>
89 for an explanation to their meanings.
90
91 Example: To download a module's tarball to the current directory,
92
93 cpanp -d --fetchdir=. MODULE ...
94
95 =cut
96
97 1;
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: