New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeclared dependency App::find2perl #62

Open
eserte opened this Issue Nov 17, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@eserte
Contributor

eserte commented Nov 17, 2018

If App::find2perl is not installed, then t/find.t fails:

Please install App::find2perl before continuing.

#   Failed test 'Found files with -amin: find /var/tmp/cpansmoker-1023/2018111715/ppt-find-JXSnKlRM -type f -amin -50'
#   at t/find.t line 46.
#          got: ''
#     expected: '/var/tmp/cpansmoker-1023/2018111715/ppt-find-JXSnKlRM/a/b/c/20.txt
# /var/tmp/cpansmoker-1023/2018111715/ppt-find-JXSnKlRM/d/40.txt
# '
Please install App::find2perl before continuing.

#   Failed test 'Found files with -mmin: find /var/tmp/cpansmoker-1023/2018111715/ppt-find-JXSnKlRM -type f -mmin +50'
#   at t/find.t line 50.
#          got: ''
#     expected: '/var/tmp/cpansmoker-1023/2018111715/ppt-find-JXSnKlRM/e/f/60.txt
# /var/tmp/cpansmoker-1023/2018111715/ppt-find-JXSnKlRM/g/h/i/80.txt
# '
# Looks like you failed 2 tests of 15.
t/find.t ..... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/15 subtests 
@eserte

This comment has been minimized.

Contributor

eserte commented Nov 17, 2018

Well, the problem is slightly different: I see that App::find2perl is correctly declared as a prereq. But there are situations when the module is in PERL5LIB, but the script find2perl is not in PATH. This usually happens in a test-only or test-all-then-install setup. Not sure how this can be fixed. It would be better if App::find2perl had the real implementation of find2perl, and in this case PPT could use the module instead of the script.

@eserte

This comment has been minimized.

Contributor

eserte commented Nov 17, 2018

Or it could we workarounded by extending PATH according to the PERL5LIB setting, or the current @INC. Something like this (would need adjustment for Windows because of path separators):

$ENV{PATH} .= ":" . join(":", map { s{/blib/lib$}{/blib/script}r } grep { m{/blib/lib} } @INC);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment