CPAN-Mini-Inject
view release on metacpan or search on metacpan
lib/CPAN/Mini/Inject.pm view on Meta::CPAN
croak "$0: required option not specified: $optionchk" if $optionchk;
croak "$0: no repository configured"
unless $self->config->get( 'repository' );
croak sprintf "$0: cannot write to repository <%s>", $self->config->get( 'repository' )
unless -w $self->config->get( 'repository' );
croak "$0: cannot read module file: $options{file}"
unless -r $options{file};
# attempt to guess module and version
my $distmeta = Dist::Metadata->new( file => $options{file} );
my $packages = $distmeta->package_versions;
# include passed in module and version (prefer the declared version)
if ( $options{module} and $options{version} ) {
$packages->{ $options{module} } ||= $options{version};
}
# if no packages were found we need explicit options
if ( !keys %$packages ) {
( run in 1.960 second using v1.01-cache-2.11-cpan-748bfb374f4 )