aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/TgLib/Cache.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/TgLib/Cache.pm b/lib/TgLib/Cache.pm
index d3723b7..b6bb9e6 100644
--- a/lib/TgLib/Cache.pm
+++ b/lib/TgLib/Cache.pm
@@ -2,6 +2,7 @@ package TgLib::Cache;
use Storable qw<store retrieve>;
use File::Basename qw<dirname>;
+use File::Path qw<make_path>;
use TgLib::Env qw<$CACHE_HOME>;
@@ -27,7 +28,7 @@ sub offset {
sub save {
my $cache = shift;
- mkdir dirname $CACHE_FILE;
+ make_path dirname $CACHE_FILE;
store($cache, $CACHE_FILE);
}