]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/commitdiff
Don't try to find a versioned ebuild if the call to version->new() failed
authorVincent Pit <vince@profvince.com>
Sat, 24 Jan 2009 21:57:38 +0000 (22:57 +0100)
committerVincent Pit <vince@profvince.com>
Sat, 24 Jan 2009 21:57:38 +0000 (22:57 +0100)
lib/CPANPLUS/Dist/Gentoo.pm

index 72450d70784f488015170341ff0f948df60a4d87..22059a90b65ce689f5ea391267da16a61c9276b4 100644 (file)
@@ -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) };