diff options
-rwxr-xr-x | perl-external/bin/module-manage.pl | 11 | ||||
-rwxr-xr-x | setenv.pl | 5 |
2 files changed, 12 insertions, 4 deletions
diff --git a/perl-external/bin/module-manage.pl b/perl-external/bin/module-manage.pl index 707e6db8b..26fa09258 100755 --- a/perl-external/bin/module-manage.pl +++ b/perl-external/bin/module-manage.pl @@ -67,6 +67,13 @@ sub add { fetch_all(); index_minicpan(); + + if ( $out =~ m{FAIL} ) { + die "\n\n\n" + . "ERROR: Something did not build correctly" + . " - please see ~/.cpanm/build_log for details" + . "\n\n\n"; + } } sub index_minicpan { @@ -82,7 +89,7 @@ sub index_minicpan { } sub build_all { - my @modules = sort uniq read_file($module_list); + my @modules = sort uniq map { s{\s+$}{}; $_; } read_file($module_list); build($_) for @modules; } @@ -111,7 +118,7 @@ sub build { } sub fetch_all { - my @urls = sort uniq read_file($url_list); + my @urls = sort uniq map { s{\s+$}{}; $_; } read_file($url_list); fetch($_) for @urls; } @@ -16,8 +16,9 @@ use local::lib "$FindBin::Bin/perl-external"; use local::lib "$FindBin::Bin/perl-external/local-lib"; # add the local perllibs too -use lib "$FindBin::Bin/commonlib/perllib"; -use lib "$FindBin::Bin/perllib"; +for ( "$FindBin::Bin/commonlib/perllib", "$FindBin::Bin/perllib" ) { + $ENV{PERL5LIB} = "$_:$ENV{PERL5LIB}"; +} # also set the path to our scripts etc $ENV{PATH} = join ':', uniq "$FindBin::Bin/bin", split( m/:/, $ENV{PATH} ); |