This is an automated email from the git hooks/post-receive script.

abe pushed a commit to annotated tag 0.2.2-source
in repository libdist-zilla-role-bootstrap-perl.

commit 71dd4f52bf6fc3ce0c06848c493d98bb24c1ebb3
Author: Kent Fredric <kentfred...@gmail.com>
Date:   Fri Oct 25 08:53:09 2013 +1300

    Use more safe code
---
 sterilize_env.pl | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/sterilize_env.pl b/sterilize_env.pl
index 24f5391..7c8efd3 100644
--- a/sterilize_env.pl
+++ b/sterilize_env.pl
@@ -63,7 +63,6 @@ sub no_sterile_warning {
     exit 0 unless env_true('MAYBE_BREAK_MODULE_BUILD');
     diag("\e[35m PROCEEDING\e[0m");
   }
-
 }
 
 if ( not env_true('STERILIZE_ENV') ) {
@@ -90,16 +89,21 @@ if ( not env_true('TRAVIS') ) {
   exit 1;
 }
 
+use Config;
+
+my @all_libs  = map { $Config{$_} } grep { $_ =~ /(lib|arch)exp$/ } keys 
%Config;
+my @site_libs = map { $Config{$_} } grep { $_ =~ /site(lib|arch)exp$/ } keys 
%Config;
+
 for my $perl_ver ( keys %{$extra_sterile} ) {
   if ( env_is( 'TRAVIS_PERL_VERSION', $perl_ver ) ) {
     diag("Running custom sterilization fixups");
     my $fixups = $extra_sterile->{$perl_ver};
-    if ( $fixups->{install} ) {
-      cpanm( '--quiet', '--notest', '--no-man-pages', $_ ) for @{ 
$fixups->{install} };
+    for my $target ( @{ $fixups->{install} } ) {
+      cpanm( '--quiet', '--notest', '--no-man-pages', $target );
     }
     if ( $fixups->{remove} ) {
       diag("Removing Bad things from all Config paths");
-      for my $libdir ( grep { $_ =~ /(lib|arch)exp$/ keys %Config } ) {
+      for my $libdir (@all_libs) {
         for my $removal ( @{ $fixups->{remove} } ) {
           my $path = $libdir . '/' . $removal;
           if ( -e -f $path ) {
@@ -111,8 +115,7 @@ for my $perl_ver ( keys %{$extra_sterile} ) {
     }
   }
 }
-use Config;
-for my $libdir ( grep { $_ =~ /site(lib|arch)exp$/ } keys %Config ) {
-  safe_exec( 'find', $Config{$libdir}, '-type', 'f', '-delete' );
-  safe_exec( 'find', $Config{$libdir}, '-depth', '-type', 'd', '-delete' );
+for my $libdir (@site_libs) {
+  safe_exec( 'find', $libdir, '-type', 'f', '-delete' );
+  safe_exec( 'find', $libdir, '-depth', '-type', 'd', '-delete' );
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-role-bootstrap-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to