From: Vincent Pit Date: Sat, 24 Jan 2009 21:57:38 +0000 (+0100) Subject: Don't try to find a versioned ebuild if the call to version->new() failed X-Git-Tag: v0.05~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=192c16f35be72d6b51e01855a15905313d407814;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Don't try to find a versioned ebuild if the call to version->new() failed --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 72450d7..22059a9 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -444,7 +444,7 @@ sub _cpan2portage { my @ebuilds = glob catfile($portdir, $category, $atom,"$atom-*.ebuild"); next unless @ebuilds; - if (defined $version) { + if (defined $ver) { # implies that $version is defined for (@ebuilds) { next unless /\Q$atom\E-v?([\d._]+).*?\.ebuild$/; my $eb_ver = eval { version->new($1) };