env dir code
[scpubgit/DKit.git] / lib / DX / Lib / FS / Guts.pm
index 994e648..29c3cd4 100644 (file)
@@ -84,4 +84,10 @@ sub file_content {
   return $data;
 }
 
+sub env_dir {
+  my ($self, $key) = @_;
+  $key =~ s/^\.\///;
+  return $ENV{$key}|| die "${key} not set";
+}
+
 1;