delete $self->{build_dir};
return;
}
+ binmode($writefh);
while (my $x = $readfh->READLINE) {
print $writefh $x;
}
$available_version = $];
$available_file = CPAN::find_perl();
} else {
+ if (CPAN::_sqlite_running()) {
+ CPAN::Index->reload;
+ $CPAN::SQLite->search("CPAN::Module",$need_module);
+ }
$nmo = $CPAN::META->instance("CPAN::Module",$need_module);
next if $nmo->uptodate;
$available_file = $nmo->available_file;
$CPAN::Frontend->mywarn("Warning: cannot determine META.yml without a build_dir.\n");
return;
}
- my $yaml = File::Spec->catfile($build_dir,"META.yml");
+ # if MYMETA.yml exists, that takes precedence over META.yml
+ my $meta = File::Spec->catfile($build_dir,"META.yml");
+ my $mymeta = File::Spec->catfile($build_dir,"MYMETA.yml");
+ my $yaml = -f $mymeta ? $mymeta : $meta;
$self->debug("yaml[$yaml]") if $CPAN::DEBUG;
return unless -f $yaml;
eval { $self->{yaml_content} = CPAN->_yaml_loadfile($yaml)->[0]; };
$self->{yaml_content} = +{};
}
}
- if (not exists $self->{yaml_content}{dynamic_config}
- or $self->{yaml_content}{dynamic_config}
+ # MYMETA.yml is not dynamic by definition
+ if ( $yaml ne $mymeta &&
+ ( not exists $self->{yaml_content}{dynamic_config}
+ or $self->{yaml_content}{dynamic_config}
+ )
) {
$self->{yaml_content} = undef;
}
$want_install =
CPAN::Shell::colorable_makemaker_prompt
("$id is just needed temporarily during building or testing. ".
- "Do you want to install it permanently? (Y/n)",
+ "Do you want to install it permanently?",
$default);
}
}