Revision history for DBIx-Class-Fixtures
+1.001015
+- ::External::File makes the path if its missing
+
1.001014
- Allow you to perform value substitutions inside config-sets
- Added a framework to allow you to backup / restore data external to the
requires 'Scalar::Util';
requires 'MIME::Base64';
requires 'File::Spec::Functions';
+requires 'File::Path';
requires 'DateTime::Format::SQLite' => 0.10;
requires 'DateTime::Format::MySQL' => 0;
use strict;
use warnings;
-use File::Spec::Functions 'catfile';
+use File::Spec::Functions 'catfile', 'splitpath';
+use File::Path 'mkpath';
sub _load {
my ($class, $path) = @_;
sub restore {
my ($class, $key, $content, $args) = @_;
- my $path = catfile($args->{path}, $key);
+ my ($vol, $directory, $file) = splitpath catfile($args->{path}, $key);
+ mkpath($directory) unless -d $directory;
+ my $path = catfile($vol, $directory, $file);
$class->_save($path, $content);
}