Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #71 from duckduckgo/zaahir/better-cache-clear

clear cache with rmtree()
  • Loading branch information...
commit 233a0e138dcd2f50c512caf3f7b5aaa3011bc869 2 parents d5b18dc + a7982b9
@moollaza moollaza authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/App/DuckPAN.pm
View
5 lib/App/DuckPAN.pm
@@ -21,7 +21,7 @@ use Term::ReadLine;
use Carp;
use Encode;
use Path::Class;
-#use File::Path qw(remove_tree);
+use File::Path;
our $VERSION ||= '9.999';
@@ -177,8 +177,7 @@ sub execute {
my $cache = $self->cfg->cache_path;
if (-d $cache){
print "Clearing DuckPAN cache...";
- print `rm -r $cache/*`;
- # remove_tree($self->cfg->cache_path); #better option, not working though...
+ rmtree($cache, {keep_root => 1});
print "Done\n";
}
push @modules, 'App::DuckPAN';
Please sign in to comment.
Something went wrong with that request. Please try again.