Skip to content
Snippets Groups Projects
Commit 161d3d17 authored by Patrick Meidl's avatar Patrick Meidl
Browse files

added path_append()

parent bff575df
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ our @EXPORT_OK = qw(
sort_chromosomes
parse_bytes
directory_hash
path_append
dynamic_use
);
......@@ -192,6 +193,24 @@ sub directory_hash {
}
sub path_append {
my $path1 = shift;
my $path2 = shift;
# default to current directory
$path1 = '.' unless (defined($path1));
my $return_path = "$path1/$path2";
unless (-d $return_path) {
system("mkdir -p $return_path") == 0 or
throw("Unable to create directory $return_path: $!\n");
}
return $return_path;
}
=head2 dynamic_use
Arg [1] : String $classname - The name of the class to require/import
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment