[libmoosex-has-sugar-perl] 44/120: Use Config.pm to sterilize

Intrigeri intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:09 UTC 2014


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

intrigeri pushed a commit to annotated tag 0.05070422-source
in repository libmoosex-has-sugar-perl.

commit c33191641a183e8f99d428afc22482cb74d876a9
Author: Kent Fredric <kentfredric at gmail.com>
Date:   Thu Oct 24 11:53:59 2013 +1300

    Use Config.pm to sterilize
---
 sterilize_env.pl | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/sterilize_env.pl b/sterilize_env.pl
index b8d8b8f..b92d698 100644
--- a/sterilize_env.pl
+++ b/sterilize_env.pl
@@ -38,12 +38,9 @@ if ( not exists $ENV{TRAVIS} ) {
   diag('Is not running under travis!');
   exit 1;
 }
-for my $i (@INC) {
-  next if $i !~ /site/;
-  next if $i eq '.';
-  diag( 'Sterilizing files in ' . $i );
-  safe_exec( 'find', $i, '-type', 'f', '-delete' );
-  diag( 'Sterilizing dirs in ' . $i );
-  safe_exec( 'find', $i, '-depth', '-type', 'd', '-delete' );
+use Config;
+for my $libdir ( grep { $_ =~ /site(lib|arch)exp$/ } keys %Config ) {
+  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/libmoosex-has-sugar-perl.git



More information about the Pkg-perl-cvs-commits mailing list