'DBIx::Class' => 0,
'Class::Accessor' => 0,
'Path::Class' => 0,
- 'Config::Any' => 0,
+ 'Config::Any::JSON' => 0,
'Data::Dump::Streamer' => 0,
- 'File::Slurp' => 0,
'Hash::Merge' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
use DBIx::Class::Exception;
use Class::Accessor;
use Path::Class qw(dir file);
+use File::Slurp;
use Config::Any::JSON;
use Data::Dump::Streamer;
use Data::Visitor::Callback;
-use File::Slurp;
use File::Path;
use File::Copy::Recursive qw/dircopy/;
+use File::Copy qw/move/;
use Hash::Merge qw( merge );
use Data::Dumper;
=head1 AUTHOR
+Luke Saunders <luke@shadowcatsystems.co.uk>
+
=head1 CONTRIBUTORS
=head1 METHODS
$self->msg("generating fixtures");
my $tmp_output_dir = dir($output_dir, '-~dump~-');
- unless (-e $tmp_output_dir) {
- $self->msg("- creating $tmp_output_dir");
- mkdir($tmp_output_dir, 0777);
- }else {
+ if (-e $tmp_output_dir) {
$self->msg("- clearing existing $tmp_output_dir");
- # delete existing fixture set
- system("rm -rf $tmp_output_dir/*");
+ $tmp_output_dir->rmtree;
}
+ $self->msg("- creating $tmp_output_dir");
+ $tmp_output_dir->mkpath;
# write version file (for the potential benefit of populate)
my $version_file = file($tmp_output_dir, '_dumper_version');
}
$self->msg("- moving temp dir to $output_dir");
- system("mv $tmp_output_dir/* $output_dir/");
+ move($_, dir($output_dir, $_->relative($_->parent)->stringify)) for $tmp_output_dir->children;
if (-e $output_dir) {
$self->msg("- clearing tmp dir $tmp_output_dir");
# delete existing fixture set