X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FCPANPLUS%2FDist%2FGentoo.pm;h=c31f21f54caad4b068305cb71d5f03806e705f16;hb=94531017fe542019334bea7ad734cc71236ba2ee;hp=49105e8bb535a99d4ea7937589768f9974e06d32;hpb=3e56111c31afdf423151f775d2e7afd08bc16958;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 49105e8..c31f21f 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -343,7 +343,7 @@ sub create { my $OK = sub { $stat->created(1); - $stat->dist($file); + $stat->dist($file) if defined $file; 1; }; @@ -351,7 +351,7 @@ sub create { $stat->created(0); $stat->dist(undef); $self->_abort(@_) if @_; - if ($file and -f $file) { + if (defined $file and -f $file) { 1 while unlink $file; } 0; @@ -365,6 +365,7 @@ sub create { if ($stat->created) { $self->_skip($stat->distribution, 'was already created'); + $file = $stat->dist; # Keep the existing one. return $OK->(); }