Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Testing a Dancer2 app with locally installed modules

by Anonymous Monk
on Oct 28, 2020 at 03:01 UTC ( [id://11123247]=note: print w/replies, xml ) Need Help??


in reply to Testing a Dancer2 app with locally installed modules

Why aren't you using boilerplate?

hardcode

$ perldoc prove |grep include -I Library paths to include.

Replies are listed 'Best First'.
Re^2: Testing a Dancer2 app with locally installed modules
by Anonymous Monk on Oct 28, 2020 at 03:37 UTC

    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;

      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

Re^2: Testing a Dancer2 app with locally installed modules
by GertMT (Hermit) on Oct 28, 2020 at 14:16 UTC
    If I may ask, what actually would have been considered using boilerplate?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11123247]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found