Subject: | System perl used in tests (v2.3.0) |
It seems that t/cli.t calls scripts which run with the first perl found in the user's PATH (usually the system perl), not with the perl used for the build:
...
Can't locate Clone/Choose.pm in @INC (you may need to install the Clone::Choose module) (@INC contains: /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at bin/stow line 467, <DATA> line 22.
BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line 22.
# Failed test '--help should return 0 exit code'
# at t/cli.t line 63.
# got: '512'
# expected: '0'
# Failed test 'unrecognised option should return 1 exit code'
# at t/cli.t line 66.
# got: '2'
# expected: '1'
# Failed test 'unrecognised option should be listed'
# at t/cli.t line 67.
# 'Can't locate Clone/Choose.pm in @INC (you may need to install the Clone::Choose module) (@INC contains: /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/lib /home/cpansand/.cpan/build/2019062904/Stow-v2.3.0-f09Oxe/blib/arch bin t /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at bin/stow line 467, <DATA> line 22.
# BEGIN failed--compilation aborted at bin/stow line 467, <DATA> line 22.
# '
# doesn't match '(?^m:^Unknown option: foo$)'
# Looks like you failed 3 tests of 3.
t/cli.t ....................
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/3 subtests
...
Possible fixes are to use the version of the script in blib/script, as it has already the correct shebang there, or to explicitly call the script with $^X.
Also, it seems that Clone::Choose is not declared as a prereq.