The problem is something different. Andreas' smoker very probably built the dependency App::Ack
(which looks in the fail reports like being absent) successfully. But here come at least two problems:
- When a distribution gets tested, then its dependencies may or may not be installed already. However, it's guaranteed that all dependent modules are made available through the
PERL5LIB
environment variable, somake test
usually works (To be more specific, if theinstall Module
command is used in the CPAN shell, then all dependencies are installed immediately. If thetest Module
command is used, then dependencies are only built, but not installed. The CPAN user can do the installation later usinginstall_tested
). So it may be thatApp::Ack
is not installed here, just built. Especially this means that theack
script is not installed in the final location. - Even if it is installed, many smoke testers or users who have multiple perls installed in parallel use a non-standard directory for this perl. So
ack
wouldn't be installed in/usr/bin
or/usr/local/bin
, but in the bin directory belonging to this perl. This directory may or may not be in the user'sPATH
at all. So you cannot assume thatcan_run("ack")
works here. A workaround here is to add$Config{scriptdir}
temporarily to$ENV{PATH}
. Another solution would be to use the App module instead of the script, if it's possible. Unfortunately it looks likeack
can only be called as a script.
If you look at a sample fail report, then you can see that App::Ack
was installed (it appears in the PREREQUISITES section both under requires and build_requires, you can also see which App::Ack
version is installed in the "HAVE" column). You can also see the user's PATH
(in the ENVIRONMENT section). And you may guess about the scriptdir for this perl, it's usually the same directory where the perl binary itself is installed, and the path to current perl is visible in $^X
(under "Perl special variables").
If you want to reproduce the behavior, then you need to deinstall ack
from your machine, build a custom perl using ./configure.gnu --prefix=/path/to/custom/perl-5.X.Y
, and use this perl for tests.