develooper Front page | perl.module-authors | Postings from November 2018

Re: Perl 5.26 and the . in INC issue where modules won't install

Thread Previous | Thread Next
From:
Shawn H Corey
Date:
November 1, 2018 18:41
Subject:
Re: Perl 5.26 and the . in INC issue where modules won't install
Message ID:
20181101144121.202edea4@sage
On Thu, 1 Nov 2018 15:28:07 +0000
"Martin J. Evans" <martin.evans@easysoft.com> wrote:

> Increasingly I am having problems with modules in Perl 5.26 and later
> which won't install because of the . not in @INC issue. Quite often
> it is not even the module I want to use but a requirement

You should never use the current directory. If the module is located in
the same directory as the script, `use FindBin`
https://perldoc.perl.org/FindBin.html


use FindBin qw( $Bin );
use lib $Bin;
# the script's modules go here

Or:

use FindBin qw( $RealBin );
use lib $RealBin;
# the script's modules go here


FindBin is a standard module. For a list of standard modules, see
`perldoc perlmodlib` https://perldoc.perl.org/perlmodlib.html


-- 
Don't stop where the ink does.

	Shawn H Corey

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About