Permalink
Browse files

Use --local-lib when calling cpanm

  • Loading branch information...
1 parent 43c62d4 commit e5412b5d69dc4d5415c92a7daaa47fb4860ca4ea @alexrj committed Dec 15, 2016
View
@@ -11,3 +11,4 @@ MANIFEST.bak
xs/MANIFEST.bak
xs/assertlib*
.init_bundle.ini
+local-lib
View
@@ -20,3 +20,4 @@ addons:
- libboost-thread1.55-dev
- libboost-system1.55-dev
- libboost-filesystem1.55-dev
+ - liblocal-lib-perl
View
@@ -107,7 +107,16 @@ EOF
if !$cpanm;
my @cpanm_args = ();
push @cpanm_args, "--sudo" if $sudo;
-
+
+ # install local::lib without --local-lib otherwise it's not usable afterwards
+ if (!eval "use local::lib; 1") {
+ my $res = system $cpanm, @cpanm_args, 'local::lib';
+ warn "Warning: local::lib is required. You might need to run the `cpanm --sudo local::lib` command in order to install it.\n"
+ if $res != 0;
+ }
+
+ push @cpanm_args, ('--local-lib', 'local-lib');
+
# make sure our cpanm is updated (old ones don't support the ~ syntax)
system $cpanm, @cpanm_args, 'App::cpanminus';
View
@@ -6,6 +6,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/lib";
+ use local::lib "$FindBin::Bin/local-lib";
}
use File::Basename qw(basename);
View
@@ -7,6 +7,9 @@ plan tests => 34;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use lib "$FindBin::Bin/../lib";
+ use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -7,6 +7,7 @@ plan tests => 24;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first sum);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first sum);
View
@@ -7,6 +7,7 @@ plan tests => 6;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -7,6 +7,7 @@ plan tests => 6;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(sum);
View
@@ -7,6 +7,7 @@ plan tests => 11;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -7,6 +7,7 @@ plan tests => 12;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -8,6 +8,7 @@ plan tests => 20;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -7,6 +7,7 @@ plan tests => 92;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first sum);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first sum);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -7,6 +7,7 @@ plan tests => 42;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -8,6 +8,7 @@ plan tests => 4;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r::ExtrusionLoop ':roles';
View
@@ -7,6 +7,7 @@ plan tests => 18;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw();
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(any);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first sum);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -8,6 +8,7 @@ plan tests => 16;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
# temporarily disable compilation errors due to constant not being exported anymore
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use List::Util qw(first);
View
@@ -5,6 +5,7 @@ use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use File::Basename qw(basename);
@@ -9,6 +9,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Getopt::Long qw(:config no_auto_abbrev);
View
@@ -8,6 +8,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Getopt::Long qw(:config no_auto_abbrev);
View
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Getopt::Long qw(:config no_auto_abbrev);
View
@@ -6,6 +6,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Slic3r;
View
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use File::Basename qw(basename);
View
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use File::Basename qw(basename);
View
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Getopt::Long qw(:config no_auto_abbrev);
@@ -7,6 +7,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Getopt::Long qw(:config no_auto_abbrev);
View
@@ -8,6 +8,7 @@
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
+ use local::lib "$FindBin::Bin/../local-lib";
}
use Getopt::Long qw(:config no_auto_abbrev);

0 comments on commit e5412b5

Please sign in to comment.