From: Vincent Pit Date: Sun, 16 Aug 2009 20:19:32 +0000 (+0200) Subject: Bail out if the SUPER calls to prepare/create failed X-Git-Tag: v0.08~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=fe55ba7e93a5d538c223bfffacdc1a6017e27a64;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git Bail out if the SUPER calls to prepare/create failed --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 51f23d1..9cc1250 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -249,9 +249,11 @@ sub prepare { } } + $stat->prepared(0); + $self->SUPER::prepare(%opts); - $stat->prepared(0); + return $FAIL->() unless $stat->prepared; my $desc = $mod->description; ($desc = $name) =~ s/-+/::/g unless $desc; @@ -368,6 +370,11 @@ sub create { $self->SUPER::create(@_); + unless ($stat->created) { + 1 while unlink $file; + return $FAIL->(); + } + if ($stat->do_manifest and not $self->update_manifest) { 1 while unlink $file; return $FAIL->();