From: Jay Hannah Date: Fri, 11 Oct 2013 00:23:57 +0000 (-0500) Subject: Explicit die message when File::Copy->move() fails. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2da5e76fbc1cdc10f24522491c60fecfc33db2c9;p=dbsrgits%2FDBIx-Class-Fixtures.git Explicit die message when File::Copy->move() fails. e.g.: RHEL 4.1 e.g.: http://www.cpantesters.org/cpan/report/e5f076fa-17fc-11e3-ab8b-252590986129 --- diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index 87ff12c..4f3e00e 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -718,8 +718,11 @@ sub dump { } $self->msg("- moving temp dir to $output_dir"); - move($_, dir($output_dir, $_->relative($_->parent)->stringify)) - for $tmp_output_dir->children; + for ($tmp_output_dir->children) { + my $from = $_; + my $to = dir($output_dir, $from->relative($from->parent)->stringify); + move($from, $to) || die "File::Copy->move('$from', '$to') failed: $!"; + } if (-e $output_dir) { $self->msg("- clearing tmp dir $tmp_output_dir");