Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-06-24 18:39:31 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-06-24 18:39:31 +0400
commitf32551bd35d45642a9f8e009bb004e3965a42ada (patch)
treea3c443430f1460b799e30b6515431d3d335af6fd /Build.PL
parentddc8727b70816c16d4806850ba0ecb16e465e00f (diff)
Don't check cpanm existence if SLIC3R_NO_AUTO
Diffstat (limited to 'Build.PL')
-rw-r--r--Build.PL52
1 files changed, 26 insertions, 26 deletions
diff --git a/Build.PL b/Build.PL
index 9cbf5717b..f51b56794 100644
--- a/Build.PL
+++ b/Build.PL
@@ -45,27 +45,26 @@ if ($ENV{SLIC3R_NO_AUTO}) {
next if eval "use $module $version; 1";
print "Missing optional $module $version\n";
}
-}
-
-my @try = (
- $ENV{CPANM} // (),
- File::Spec->catfile($Config{sitebin}, 'cpanm'),
- File::Spec->catfile($Config{installscript}, 'cpanm'),
-);
-
-my $cpanm;
-foreach my $path (@try) {
- if (-e $path) { # don't use -x because it fails on Windows
- $cpanm = $path;
- last;
+} else {
+ my @try = (
+ $ENV{CPANM} // (),
+ File::Spec->catfile($Config{sitebin}, 'cpanm'),
+ File::Spec->catfile($Config{installscript}, 'cpanm'),
+ );
+
+ my $cpanm;
+ foreach my $path (@try) {
+ if (-e $path) { # don't use -x because it fails on Windows
+ $cpanm = $path;
+ last;
+ }
}
-}
-if (!$cpanm) {
- if ($^O =~ /^(?:darwin|linux)$/ && system(qw(which cpanm)) == 0) {
- $cpanm = 'cpanm';
+ if (!$cpanm) {
+ if ($^O =~ /^(?:darwin|linux)$/ && system(qw(which cpanm)) == 0) {
+ $cpanm = 'cpanm';
+ }
}
-}
-die <<'EOF'
+ die <<'EOF'
cpanm was not found. Please install it before running this script.
There are several ways to install cpanm, try one of these:
@@ -79,13 +78,14 @@ If it is installed in a non-standard location you can do:
CPANM=/path/to/cpanm perl Build.PL
EOF
- if !$cpanm;
-
-my %modules = (%prereqs, %recommends);
-foreach my $module (sort keys %modules) {
- my $version = $modules{$module};
- my $res = system $cpanm, "$module~$version";
- $skip_tests = 1 if $res != 0;
+ if !$cpanm;
+
+ my %modules = (%prereqs, %recommends);
+ foreach my $module (sort keys %modules) {
+ my $version = $modules{$module};
+ my $res = system $cpanm, "$module~$version";
+ $skip_tests = 1 if $res != 0;
+ }
}
if (eval "use App::Prove; 1" && !$skip_tests) {