in reply to Re: Testing a Dancer2 app with locally installed modules
in thread Testing a Dancer2 app with locally installed modules

jwsDancer\bin\myprove.pl

use FindBin; chdir "$FindBin::Bin/.."; # jwsDancer/bin/.. system $^X, '-S', 'prove', "-I$FindBin::Bin/../lib", # jwsDancer/bin/../lib "-I$FindBin::Bin/../../local/lib/perl5", # jwsDancer/bin/../../local/lib/perl5 @ARGV;

Replies are listed 'Best First'.
Re^3: Testing a Dancer2 app with locally installed modules
by GertMT (Hermit) on Oct 28, 2020 at 14:02 UTC

    Thank you Anonymous Monk!

    Apparently the code in lib/jwsDancer.pm contained an error.

    With the script as you suggested in bin/myprove.pl I got it to work changing the path slightly (erroneously it went up one directory too far).

    use FindBin; chdir "$FindBin::Bin/.."; # jwsDancer/bin/.. system $^X, '-S', 'prove', "-I$FindBin::Bin/../lib", # jwsDancer/bin/../lib "-I$FindBin::Bin/../local/lib/perl5", # jwsDancer/bin/../local/lib/perl5 @ARGV;

    All tests run smoothly with modules locally installed and a command like: perl bin/myprove.pl -lv t/*

    Gert