develooper Front page | perl.perl5.porters | Postings from February 2009

[PATCH] add-package.pl fixup

Thread Next
From:
Jos I. Boumans
Date:
February 24, 2009 13:10
Subject:
[PATCH] add-package.pl fixup
Message ID:
570E3672-F956-42C9-8FD0-A1491EB8CE6E@dwim.org
Greetings,

sometimes, using find, add-package.pl will construct filenames with 2  
consecutive slashes, ie:

   Package-Name/bin//script.pl

As this literal string isn't in the MANIFEST yet, it'll be added  
erroneously. The below patch
fixes this.

--- perl-current-cpanplus-devel.1633/Porting/add-package.pl      
2009-01-19 17:12:08.000000000 +0100
+++ perl-current/Porting/add-package.pl 2009-02-24 22:07:24.000000000  
+0100
@@ -137,7 +137,7 @@
         ? system( "cp -fR $CPV t $TopDir" ) && die "Copy of t/  
failed: $?"
         : warn "No t/ directory found\n";

-    @TestFiles =    map { chomp; s|^$TopDirRe||; $_ }
+    @TestFiles =    map { chomp; s|^$TopDirRe||; s|//|/|g; $_ }
                      ### should we get rid of this file?
                      grep { $ExcludeRe && $_ =~ $ExcludeRe
                          ? do {  warn "Removing $_\n";
@@ -169,7 +169,7 @@

      system($CopyCmd) && die "Copy of $BinDir failed: $?";

-    @BinFiles = map { chomp; s|^$TopDirRe||; $_ }
+    @BinFiles = map { chomp; s|^$TopDirRe||; s|//|/|g; $_ }
                  ### should we get rid of this file?
                  grep { $ExcludeRe && $_ =~ $ExcludeRe
                      ? do {  warn "Removing $_\n";

--

	Jos Boumans

	How do I prove I am not crazy to people who are?




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About