Move tmpdir() to DBICTest::Util where it belongs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / _Util.pm
index 846920d..b5991fb 100644 (file)
@@ -82,7 +82,7 @@ our @EXPORT_OK = qw(
   scope_guard detected_reinvoked_destructor
   is_exception dbic_internal_try
   quote_sub qsub perlstring serialize deep_clone
-  parent_dir
+  parent_dir mkdir_p
   UNRESOLVABLE_CONDITION
 );
 
@@ -451,6 +451,12 @@ sub parent_dir ($) {
   ;
 }
 
+sub mkdir_p ($) {
+  require File::Path;
+  # do not ask for a recent version, use 1.x API calls
+  File::Path::mkpath([ "$_[0]" ]);  # File::Path does not like objects
+}
+
 
 {
   my $list_ctx_ok_stack_marker;