[Bps-public-commit] r9697 - bpsbuilder/lib/BPSBuilder

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Nov 19 07:33:42 EST 2007


Author: sunnavy
Date: Mon Nov 19 07:33:39 2007
New Revision: 9697

Modified:
   bpsbuilder/lib/BPSBuilder/Util.pm

Log:
fix warnings 'Variable "%seen" will not stay shared'

Modified: bpsbuilder/lib/BPSBuilder/Util.pm
==============================================================================
--- bpsbuilder/lib/BPSBuilder/Util.pm	(original)
+++ bpsbuilder/lib/BPSBuilder/Util.pm	Mon Nov 19 07:33:39 2007
@@ -112,11 +112,8 @@
     print $wrapper $WRAPPER || die $!;
     close($wrapper) ||die $!;
 
-    foreach my  $dir ( qw(bin sbin libexec)) {
-     find(\&wrapperize_directory, grep { -d $_} map {$self->install_path ."/". $_} qw(bin sbin libexec)); 
-    }
     my %seen;
-    sub wrapperize_directory {
+    my $wrapperize_directory = sub {
         my $file = $_;
         return unless $file and -f $file;
         return if $seen{$File::Find::name}++;
@@ -129,7 +126,13 @@
         warn $File::Find::dir.'/../etc/bps-script-wrapper' => $file;
         link($File::Find::dir.'/../etc/bps-script-wrapper' => $file) || die $!;
 
-}
+    };
+
+    foreach my $dir (qw(bin sbin libexec)) {
+        find( $wrapperize_directory,
+            grep  { -d $_ }
+              map { $self->install_path . "/" . $_ } qw(bin sbin libexec) );
+    }
 
 }
 



More information about the Bps-public-commit mailing list