aboutsummaryrefslogtreecommitdiff
path: root/lib/WebCoso/Cleaner.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/WebCoso/Cleaner.pm')
-rw-r--r--lib/WebCoso/Cleaner.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/WebCoso/Cleaner.pm b/lib/WebCoso/Cleaner.pm
index e9f9dcf..8c7eb32 100644
--- a/lib/WebCoso/Cleaner.pm
+++ b/lib/WebCoso/Cleaner.pm
@@ -4,6 +4,7 @@ use warnings;
use File::Next;
use Path::Class;
use WebCoso::Common;
+use Log::Log4perl ':easy';
sub clean {
my %to_keep;
@@ -12,10 +13,14 @@ sub clean {
my $iter=File::Next::files({descend_filter=>sub{!m{^\.svn$}}},$WebCoso::Common::SRCPATH,$WebCoso::Common::DSTPATH);
while (defined (my $file=$iter->())) {
+ DEBUG("Examining $file");
next if exists $to_keep{$file};
+ INFO("Removing $file");
unlink $file;
}
+ INFO("Removing $WebCoso::Common::DSTPATH");
dir($WebCoso::Common::DSTPATH)->rmtree;
+ INFO("Removing $WebCoso::Common::SRCPATH/_webcoso");
dir($WebCoso::Common::SRCPATH,'_webcoso')->rmtree;
}