Lines Matching full:cpan
1 package App::Cpan;
13 App::Cpan - easily interact with CPAN from the command line
18 cpan module_name [ module_name ... ]
21 cpan [-cfFimtTw] module_name [ module_name ... ]
24 cpan -I module_name [ module_name ... ]
27 cpan -p ...
31 cpan .
33 # without arguments, starts CPAN.pm shell
34 cpan
37 cpan [-ahpruvACDLOPX]
41 This script provides a command interface (not a shell) to CPAN. At the
42 moment it uses CPAN.pm to do the work, but it is not a one-shot command
43 runner for CPAN.pm.
51 Creates a CPAN.pm autobundle with CPAN::Shell->autobundle.
68 (meaning, modules locally installed but have newer versions on CPAN).
69 Each line has three columns: module name, local version, and CPAN
78 % cpan -f -i Module::Foo
82 Turn off CPAN.pm's attempts to lock anything. You should be careful with
99 If you want this feature, check out Yanick Champoux's C<Git::CPAN::Patch>
119 Load the file that has the CPAN configuration data. This should have the
120 same format as the standard F<CPAN/Config.pm> file, which defines
121 C<$CPAN::Config> as an anonymous hash.
123 If the file does not exist, C<cpan> dies.
127 Dump the configuration in the same format that CPAN.pm uses. This is useful
167 Recompiles dynamically loaded modules with CPAN::Shell->recompile.
171 Drop in the CPAN.pm shell. This command does this automatically if you don't
189 Print the script version and CPAN.pm version then exit.
193 Print detailed information about the cpan client.
199 Turn on cpan warnings. This checks various things, like directory permissions,
217 cpan -h
220 cpan -v
223 cpan -a
226 cpan -r
229 cpan -u
232 cpan -i Netscape::Booksmarks Business::ISBN
235 cpan -fi CGI::Minimal URI
238 cpan -Ti CGI::Minimal URI
242 There are several components in CPAN.pm that use environment variables.
256 that do that correctly. C<cpan(1)> sets this to C<1> unless it already
261 Use the default answer for a prompted questions. C<cpan(1)> sets this
266 As with C<PERL5OPT>, a string of additional C<cpan(1)> options to
290 use CPAN 1.80 (); # needs no test
314 # set up the order of options that we layer over CPAN::Shell
323 %CPAN_METHODS = ( # map switches to method names in CPAN::Shell
358 F => [ \&_lock_lobotomy, NO_ARGS, GOOD_EXIT, 'Turn off CPAN.pm lock files' ],
380 's' => [ \&_shell, NO_ARGS, GOOD_EXIT, 'Drop into the CPAN.pm shell' ],
416 if( 0 == @ARGV ) { CPAN::shell(); exit 0 }
435 # this is what CPAN.pm would do otherwise
436 local $CPAN::Be_Silent = 1;
437 CPAN::HandleConfig->load(
458 $CPAN::Config->{$setting} = $value;
479 # session, we'd be in the CPAN shell.
561 $CPAN::Frontend->mywarn(">($autoload): $_\n")
596 $logger = Log::Log4perl->get_logger( 'App::Cpan' );
623 elsif( not $switch and not @$args ) { return CPAN::shell() }
627 # Get and check the method from CPAN::Shell
629 die "CPAN.pm cannot $method!\n" unless CPAN::Shell->can( $method );
631 # call the CPAN::Shell method, with force or notest if specified
633 if( $options->{f} ) { sub { CPAN::Shell->force( $method, @_ ) } }
634 elsif( $options->{T} ) { sub { CPAN::Shell->notest( $method, @_ ) } }
635 else { sub { CPAN::Shell->$method( @_ ) } }
669 CPAN.pm sends all the good stuff either to STDOUT, or to a temp
670 file if $CPAN::Be_Silent is set. I have to intercept that output
682 *CPAN::Shell::myprint = sub {
686 $CPAN::Config->{colorize_print}||'bold blue on_white',
690 *CPAN::Shell::mywarn = sub {
694 $CPAN::Config->{colorize_warn}||'bold red on_white'
704 # These are lines I don't care about in CPAN.pm output. If I can
747 $logger->debug( "Last interesting line of CPAN.pm output is:\n\t$lines[-1]" );
794 $CPAN::Config->{trust_test_report_history} = 1;
807 warn "Please install Pod::Perldoc, maybe try 'cpan -i Pod::Perldoc'\n";
815 "$0 script version $VERSION, CPAN.pm version " . CPAN->VERSION );
827 foreach my $mirror ( @{ $CPAN::Config->{urllist} } ) {
834 require CPAN::Mirrors;
836 if ( $CPAN::Config->{connect_to_internet_ok} ) {
837 $CPAN::Frontend->myprint(qq{Trying to fetch a mirror list from the Internet\n});
838 …eval { CPAN::FTP->localize('MIRRORED.BY',File::Spec->catfile($CPAN::Config->{keep_source_where},'M…
839 or $CPAN::Frontend->mywarn(<<'HERE');
841 You will need to provide CPAN mirror URLs yourself.
843 $CPAN::Frontend->myprint("\n");
846 my $mirrors = CPAN::Mirrors->new( _mirror_file() );
863 my $makepl_arg = $CPAN::Config->{makepl_arg};
864 my $mbuildpl_arg = $CPAN::Config->{mbuildpl_arg};
949 my $urls = $CPAN::Config->{urllist};
971 $CPAN::Config->{keep_source_where}, $file );
975 require CPAN::FTP;
976 CPAN::FTP->localize( $file, $local_path, 3, 1 );
983 require CPAN::Mirrors;
985 my $mirrors = CPAN::Mirrors->new( _mirror_file() );
997 $CPAN::Config->{urllist} = [
1073 $CPAN::Config->{urllist} = [ split /,/, $_[0] ];
1075 $logger->debug( "Mirrors are @{$CPAN::Config->{urllist}}" );
1082 "Creating autobundle in $CPAN::Config->{cpan_home}/Bundle" );
1084 CPAN::Shell->autobundle;
1093 CPAN::Shell->recompile;
1102 CPAN::Shell->upgrade();
1111 CPAN::shell();
1121 croak( "cpan config file [$file] for -j does not exist!\n" ) unless -e $file;
1124 $CPAN::Config = {};
1125 delete $INC{'CPAN/Config.pm'};
1129 # CPAN::HandleConfig::require_myconfig_or_config looks for this
1130 $INC{'CPAN/MyConfig.pm'} = 'fake out!';
1132 # CPAN::HandleConfig::load looks for this
1133 $CPAN::Config_loaded = 'fake out';
1149 [$CPAN::Config],
1150 ['$CPAN::Config']
1162 *CPAN::_flock = sub { 1 };
1163 *CPAN::checklock = sub { 1 };
1172 local $CPAN::DEBUG = 1;
1199 croak "You need LWP::Simple to use features that fetch files from CPAN\n"
1206 foreach my $site ( @{ $CPAN::Config->{urllist} } )
1272 my $url = "http://search.cpan.org/~" . lc( $module->userid ) . "/" .
1319 my $author = CPAN::Shell->expand( "Author", $module->userid );
1337 my $author = CPAN::Shell->expand( "Author", $module->userid );
1347 'CPAN: ' . $module->cpan_version . ' ' .
1363 $modules = [ map { $_->id } CPAN::Shell->expand( "Module", "/./" ) ];
1371 printf "%-40s %6s %6s\n", "Module Name", "Local", "CPAN";
1521 my $expanded = CPAN::Shell->expandany( $module );
1523 $expanded = CPAN::Shell->expand( "Module", $module );
1664 * When I capture CPAN.pm output, I need to check for errors and
1677 L<CPAN>, L<App::cpanminus>
1681 This code is in Github in the CPAN.pm repository:
1698 David Golden helps integrate this into the C<CPAN.pm> repos.
1704 brian d foy, C<< <bdfoy@cpan.org> >>