my $OK = sub { $stat->prepared(1); 1 };
my $FAIL = sub { $stat->prepared(0); $self->_abort(@_) if @_; 0 };
- my $keywords = delete $opts{'keywords'};
+ my $keywords = delete $opts{keywords};
if (defined $keywords) {
$keywords = [ split ' ', $keywords ];
} else {
}
$stat->keywords($keywords);
- my $manifest = delete $opts{'manifest'};
+ my $manifest = delete $opts{manifest};
$manifest = 1 unless defined $manifest;
$manifest = 0 if $manifest =~ /^\s*no?\s*$/i;
$stat->do_manifest($manifest);
- my $header = delete $opts{'header'};
+ my $header = delete $opts{header};
if (defined $header) {
1 while chomp $header;
$header .= "\n\n";
}
$stat->header($header);
- my $footer = delete $opts{'footer'};
+ my $footer = delete $opts{footer};
if (defined $footer) {
$footer = "\n" . $footer;
} else {
}
$stat->footer($footer);
- my $overlay = delete $opts{'overlay'};
+ my $overlay = delete $opts{overlay};
$overlay = (defined $overlay) ? abs_path $overlay : '/usr/local/portage';
$stat->overlay($overlay);
- my $distdir = delete $opts{'distdir'};
+ my $distdir = delete $opts{distdir};
$distdir = (defined $distdir) ? abs_path $distdir : $default_distdir;
$stat->distdir($distdir);
- if ($stat->do_manifest && !-w $stat->distdir) {
- return $FAIL->('distdir isn\'t writable');
- }
+ return $FAIL->("distdir isn't writable") if $stat->do_manifest && !-w $distdir;
+
$stat->fetched_arch($mod->status->fetch);
my $cur = File::Spec->curdir();
$stat->uri('http://search.cpan.org/dist/' . $name);
- unless ($author =~ /^(.)(.)/) {
- return $FAIL->('Wrong author name');
- }
- $stat->src("mirror://cpan/modules/by-authors/id/$1/$1$2/$author/"
- . $mod->package);
+ $author =~ /^(.)(.)/ or return $FAIL->('Wrong author name');
+ $stat->src("mirror://cpan/modules/by-authors/id/$1/$1$2/$author/" . $mod->package);
$stat->license($self->intuit_license);
my @licenses = CPANPLUS::Dist::Gentoo::Maps::license_c2g($dslip_license{$1});
return \@licenses if @licenses;
}
+
my $extract_dir = $mod->status->extract;
for my $meta_file (qw/META.json META.yml/) {