X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=e3ff15340d0f10f842215bbe0a0630b9a07bc563;hb=1ddbd8fe61633c043ec7be4e0a638bf8a30c3f74;hp=0003b36992ae0dff913006b9419cf720fdae86cb;hpb=77110d525f6b966b8f87c11669f177127e6930d9;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 0003b36..e3ff153 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -364,8 +364,9 @@ sub prepare { } $stat->requires(\@requires); + my $meta = $self->meta; $stat->min_perl(CPANPLUS::Dist::Gentoo::Maps::perl_version_c2g( - eval { $self->meta->{requires}->{perl} } + $meta->{requires}->{perl} )); return $OK->(); @@ -391,6 +392,7 @@ sub meta { my $meta_file = File::Spec->catdir($extract_dir, $name); next unless -e $meta_file; + local $@; my $meta = eval { Parse::CPAN::Meta::LoadFile($meta_file) }; if (defined $meta) { $stat->meta($meta); @@ -426,7 +428,8 @@ sub intuit_license { return \@licenses if @licenses; } - my $license = $self->meta->{license}; + my $meta = $self->meta; + my $license = $meta->{license}; if (defined $license) { my @licenses = CPANPLUS::Dist::Gentoo::Maps::license_c2g($license); return \@licenses if @licenses; @@ -565,11 +568,10 @@ sub ebuild_source { push @requires, $atom; } - my $min_perl = $stat->min_perl; my $perl = CPANPLUS::Dist::Gentoo::Atom->new( category => 'dev-lang', name => 'perl', - (defined $min_perl ? (version => $min_perl, range => '>=') : ()), + version => $stat->min_perl, ); @requires = CPANPLUS::Dist::Gentoo::Atom->fold($perl, @requires); @@ -619,7 +621,7 @@ sub _cpan2portage { return CPANPLUS::Dist::Gentoo::Atom->new( category => $last->category, name => $last->name, - (defined $version ? (version => $version, range => '>=') : ()), + version => $version, ebuild => $last->ebuild, ); }