summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorToni Saario <toni.saario@qt.io>2019-07-24 11:19:49 +0300
committerToni Saario <toni.saario@qt.io>2019-08-06 12:09:30 +0000
commit5e3b8ac763dffdd5e0343b6183540b7b59651502 (patch)
tree03090129becd205369e9c6b3210d417fa6301871 /scripts
parentda16b930f44d59cefc736b5439b73e1aaa19700f (diff)
Install local::lib via setup.pl rather than requiring it
Setup.pl does not require local::lib module. It would make sense to install local::lib with script also rather that requiring it, while also removing a dependency. Change-Id: I40c58f397f291bb265b5b3878c67c33417f28e37 Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setup.pl37
1 files changed, 1 insertions, 36 deletions
diff --git a/scripts/setup.pl b/scripts/setup.pl
index a94ccd79..80fab045 100755
--- a/scripts/setup.pl
+++ b/scripts/setup.pl
@@ -175,6 +175,7 @@ sub all_required_cpan_modules
Lingua::EN::Numbers
List::Compare
List::MoreUtils
+ local::lib
Params::Validate
Perl::Critic
QMake::Project
@@ -421,39 +422,6 @@ sub run_cpan
return $out;
}
-# Import the local::lib module into the current process or exit.
-#
-# Importing local::lib ensure the selected prefix exists and is
-# available for use by the current process and all subprocesses.
-#
-# This is equivalent to `use local::lib', except that it will give
-# a helpful failure message if local::lib is not available.
-#
-sub do_local_lib
-{
- my ($self) = @_;
-
- my $prefix = $self->{locallib};
- eval { require local::lib; local::lib->import($prefix) };
- if (!$EVAL_ERROR) {
- return;
- }
-
- print STDERR
- "$EVAL_ERROR\n\nI need you to manually install the local::lib module "
- ."before I can proceed. This module allows me to easily set up a perl "
- ."prefix under $prefix.\n";
-
- # This hint may be helpful to some :)
- if (-e "/etc/debian_version") {
- print STDERR
- "\nOn Debian and Ubuntu, this module is available from the "
- ."`liblocal-lib-perl' package.\n";
- }
-
- exit 1;
-}
-
# Try hard to ensure all CPAN modules returned from all_required_cpan_modules
# are installed. The cpan command may be run several times.
#
@@ -463,9 +431,6 @@ sub ensure_complete_cpan
{
my $self = shift;
- # We expect everything under a local::lib
- $self->do_local_lib;
-
return $self->try_hard_to_install(
name => "CPAN",
need_sub => \&missing_required_cpan_modules,