Set up environment variables so that the toolchain is temporarily available :
# export OLDPATH=$PATH
- # export PATH=/root/CPANPLUS-Dist-Gentoo-0.08/bin:$PATH
+ # export PATH=/root/CPANPLUS-0.88/bin:$PATH
# export PERL5LIB=/root/CPANPLUS-Dist-Gentoo-0.08/blib/lib:/root/CPANPLUS-0.88/lib:/root/CPANPLUS-0.88/inc/bundle
Make sure you don't have an old C<.cpanplus> configuration visible :
"$name-*.ebuild",
) or next;
- my @atoms = map CPANPLUS::Dist::Gentoo::Atom->new(
- defined $version ? (
- ebuild => $_,
- range => '>=',
- ) : (
- category => $category,
- name => $name,
- ),
- ), @ebuilds;
+ my $last = reduce { $a < $b ? $b : $a } # handles overloading
+ map CPANPLUS::Dist::Gentoo::Atom->new_from_ebuild($_),
+ @ebuilds;
+ next if defined $version and $last < $version;
- my $atom = reduce { $a < $b ? $b : $a } @atoms; # handles overloading
- next if defined $version and $atom < $version;
-
- return $atom;
+ return CPANPLUS::Dist::Gentoo::Atom->new(
+ category => $last->category,
+ name => $last->name,
+ (defined $version ? (version => $version, range => '>=') : ()),
+ ebuild => $last->ebuild,
+ );
}
}