Since MANIFEST is automatically generated, shouldn't we take that
opportunity to generate MANIFEST.SKIP as well? 

? lib/C
? lib/threads
Index: lib/ModPerl/Manifest.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Manifest.pm,v
retrieving revision 1.7
diff -u -I$Id: -r1.7 Manifest.pm
--- lib/ModPerl/Manifest.pm     26 Sep 2003 17:37:33 -0000      1.7
+++ lib/ModPerl/Manifest.pm     21 Oct 2003 23:15:09 -0000
@@ -49,16 +49,31 @@
     my $matches = maniskip();
     open my $fh, '>', 'MANIFEST' or die "open MANIFEST: $!";
 
+    my %files;
+
     for my $file (sort @files) {
         if ($matches->($file)) {
             warn "skipping $file\n";
             next;
         }
-
+        $files{$file}++;
         print "$file\n";
         print $fh "$file\n";
     }
 
+    close $fh;
+    
+    open $fh, '>', 'MANIFEST.SKIP' or die "open MANIFEST.SKIP: $!";
+    my $cwd = Cwd::cwd();
+    finddepth({ follow => 1, wanted => sub {
+        return if -d;
+        my $file = $File::Find::name;
+        $file =~ s,^$cwd/?,,;
+        unless (exists $files{$file}) {
+            print $fh "$file\n";
+        }
+    }},  Cwd::cwd());
+    
     close $fh;
 }
 


-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to