aboutsummaryrefslogtreecommitdiff
path: root/lib/WebCoso/Cleaner.pm
diff options
context:
space:
mode:
authordakkar <dakkar@luxion>2008-10-01 13:33:36 +0000
committerdakkar <dakkar@luxion>2008-10-01 13:33:36 +0000
commit33aa584d604fa52fdb98b30d6003a74c34c117af (patch)
tree2afd3e09cc46f1a7566f240463732d8a2da1b525 /lib/WebCoso/Cleaner.pm
parentbetter tag handling (diff)
downloadWebCoso-33aa584d604fa52fdb98b30d6003a74c34c117af.tar.gz
WebCoso-33aa584d604fa52fdb98b30d6003a74c34c117af.tar.bz2
WebCoso-33aa584d604fa52fdb98b30d6003a74c34c117af.zip
addded logging
git-svn-id: svn://luxion/repos/WebCoso/trunk@382 fcb26f47-9200-0410-b104-b98ab5b095f3
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;
}