removed accidentally added whitespace
[catagits/HTML-Zoom.git] / maint / synopsis-extractor
index fb67966..57e7437 100755 (executable)
@@ -24,8 +24,7 @@ sub extract_synopsis {
         my $extracted = $1;
         $extracted=~s/^\S.+?$//m; # wipe out non code lines in pod
         my $begin_end = qr[begin|end]x;
-        $extracted=~s/\n^=$begin_end testinfo\n\n//smg; # remove
-
+        $extracted=~s/\n^=$begin_end testinfo\n\n//smg; # remove test block
         return $extracted;
     } else {
         return;
@@ -67,7 +66,7 @@ sub create_or_update_test_file {
     print $syn_test $synopsis_string;
 }
 
-find(sub {
+sub wanted {
     my $target_path =
         create_test_path_from_lib $_;
     my $synopsis_string =
@@ -75,11 +74,10 @@ find(sub {
         normalize_indent
         extract_synopsis
         slurp_file $File::Find::name;
-
     create_or_update_test_file
         $target_path,
         $synopsis_string,
+}
 
-    }, File::Spec->catfile($Bin, '..', 'lib'));
-
+find(\&wanted, File::Spec->catfile($Bin, '..', 'lib'));