As ->prepare may have already set it.
my $OK = sub {
$stat->created(1);
my $OK = sub {
$stat->created(1);
+ $stat->dist($file) if defined $file;
$stat->created(0);
$stat->dist(undef);
$self->_abort(@_) if @_;
$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;
1 while unlink $file;
}
0;
if ($stat->created) {
$self->_skip($stat->distribution, 'was already created');
if ($stat->created) {
$self->_skip($stat->distribution, 'was already created');
+ $file = $stat->dist; # Keep the existing one.