CPAN

 view release on metacpan or  search on metacpan

Todo  view on Meta::CPAN



	Hmmm. So Randy wants to have use_sqlite to be set before we enter the
	shell and he wants it only within the shell. This is pretty likely
	wrong.

	Trying to set use_sqlite earlier with a tiny patch to Makefile.PL.
	Doesn't work because CPAN::SQLite loads MyConfig again according to the
	debugger:

	$ = require '/home/k/.cpan/CPAN/MyConfig.pm' called from file `/home/src/perl/repoperls/installed-perls/perl/peHlG5S/perl-5.8.0@29243/lib/site_perl/5.9.5/CPAN/SQLite.pm' line 50

	So we lose the switch again. Back to the drawing board.

	Either I need a way to use CPAN::SQLite without having it guess CPAN.pm
	internals all over the place. Or Randy needs a CPAN.pm that has API
	calls for all the CPAN.pm internals. I cannot allow a plugin that tries
	to reload the Config file and overwriting the Internals that I have
	currently set. This is happening and makes it hard to predict what will
	happen next.

lib/CPAN/HandleConfig.pm  view on Meta::CPAN

    # XXX does anything do this? can it be simplified? -- dagolden, 2011-01-19
    if (@args) {
      if ($args[0] eq "args") {
        # we have not signed that contract
      } else {
        $configpm = $args[0];
      }
    }

    # use provided name or the current config or create a new MyConfig
    $configpm ||= require_myconfig_or_config() || make_new_config();

    # commit to MyConfig if we can't write to Config
    if ( ! -w $configpm && $configpm =~ m{CPAN/Config\.pm} ) {
        my $myconfig = _new_config_name();
        $CPAN::Frontend->mywarn(
            "Your $configpm file\n".
            "is not writable. I will attempt to write your configuration to\n" .
            "$myconfig instead.\n\n"
        );
        $configpm = make_new_config();

lib/CPAN/HandleConfig.pm  view on Meta::CPAN

}

sub load {
    my($self, %args) = @_;
    $CPAN::Be_Silent+=0; # protect against 'used only once'
    $CPAN::Be_Silent++ if $args{be_silent}; # do not use; planned to be removed in 2011
    my $do_init = delete $args{do_init} || 0;
    my $make_myconfig = delete $args{make_myconfig};
    $loading = 0 unless defined $loading;

    my $configpm = require_myconfig_or_config;
    my @miss = $self->missing_config_data;
    CPAN->debug("do_init[$do_init]loading[$loading]miss[@miss]") if $CPAN::DEBUG;
    return unless $do_init || @miss;
    if (@miss==1 and $miss[0] eq "pushy_https" && !$do_init) {
        $CPAN::Frontend->myprint(<<'END');

Starting with version 2.29 of the cpan shell, a new download mechanism
is the default which exclusively uses cpan.org as the host to download
from. The configuration variable pushy_https can be used to (de)select
the new mechanism. Please read more about it and make your choice



( run in 0.270 second using v1.01-cache-2.11-cpan-0d8aa00de5b )