How to use the dependency on a Perl module installed in a non-standard location?

I need to install two Perl modules on a web host. Let's call them A :: B and X :: Y. X :: Y depends on A :: B (A :: B is required to run). Both of them use Module :: Install . I successfully installed A :: B in a non-system location using

perl Makefile.PL PREFIX=/non/system/location
make; make test; make install

Now I want to install X :: Y, so I try the same

perl Makefile.PL PREFIX=/non/system/location

Output signal

$ perl Makefile.PL PREFIX=/non/system/location/
Cannot determine perl version info from lib/X/Y.pm
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Test::More          ...loaded. (0.94)
- ExtUtils::MakeMaker ...loaded. (6.54 >= 6.11)
- File::ShareDir      ...loaded. (1.00)
- A::B                ...missing.
==> Auto-install the 1 mandatory module(s) from CPAN? [y] 

It cannot find A :: B in the system, although it is installed, and when it tries to automatically install the module from CPAN, it tries to write it to the system directory (ignoring PREFIX). I tried using type variables PERL_LIBand LIBon the command line after PREFIX=..., but nothing I did seems to work.

make make install , - make test. ?

http://servers.digitaldaze.com/extensions/perl/modules.html PERL5LIB, :

export PERL5LIB=/non/system/location/lib/perl5/

.

+3
3

, :

perl Makefile.PL --skipdeps --no-manpages PREFIX=/non/system/location INSTALLSITELIB=/non/system/location/lib INSTALLSITEBIN=/non/system/location/bin INSTALLMAN1DIR=/non/system/location/man/man1 INSTALLMAN3DIR=/non/system/location/man/man3

" ", make test.

  • --skipdeps / Module:: Install, CPAN.pm .
  • , --no-manpages man-, .
0

local::lib, , , , :)

0

, , ( , , , 7- ).

perl -le 'print join $/, @INC'

(, / !) export PERL5LIB=/nonstddir/scripts/modules/lib/site_perl:/nonstddir/scripts/modules/lib

run perl -le 'print join $/, @INC' , dirs . . / , INC . //.

,

/nonstddir/scripts/modules/lib/site_perl/5.8.4/sun4-solaris-64int
/nonstddir/scripts/modules/lib/site_perl/5.8.4
/nonstddir/scripts/modules/lib/site_perl
/nonstddir/scripts/modules/lib/sun4-solaris-64int
/nonstddir/scripts/modules/lib
/usr/perl5/5.8.4/lib/sun4-solaris-64int
/usr/perl5/5.8.4/lib
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int
/usr/perl5/site_perl/5.8.4
/usr/perl5/site_perl
/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int
/usr/perl5/vendor_perl/5.8.4
/usr/perl5/vendor_perl
0

Source: https://habr.com/ru/post/1750614/


All Articles