From 5e3b8ac763dffdd5e0343b6183540b7b59651502 Mon Sep 17 00:00:00 2001 From: Toni Saario Date: Wed, 24 Jul 2019 11:19:49 +0300 Subject: 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 --- scripts/setup.pl | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'scripts') 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, -- cgit v1.2.3