From 33aa584d604fa52fdb98b30d6003a74c34c117af Mon Sep 17 00:00:00 2001 From: dakkar Date: Wed, 1 Oct 2008 13:33:36 +0000 Subject: addded logging git-svn-id: svn://luxion/repos/WebCoso/trunk@382 fcb26f47-9200-0410-b104-b98ab5b095f3 --- lib/WebCoso/Cleaner.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/WebCoso/Cleaner.pm') 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; } -- cgit v1.2.3