Skip Menu |
 

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 130983
Status: open
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: SVW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: prove does not honour -I option when searching for modules (-M) and/or plugins (-P)
Download (untitled) / with headers
text/plain 646b
I have developed a helper module that is local to one of my perl projects. The helper module should be executed once before all my tests. I have used prove's -M option. I have stored the helper module in a dedicated directory called tlib/. Unfortunately prove does not find the helper module if I use -Itlib. It would be create if the -I option could be honoured by prove while searching for modules and plugins. PS: From my perspective the documentation should be improved slightly: load() is called for modules (-M) too and it is not completely clear when to use the module (-M) and when to use the pluging (-P) approach. Kind regards Sven
Download (untitled) / with headers
text/plain 621b
On 2019-11-13 00:58:44, SVW wrote: Show quoted text
> I have developed a helper module that is local to one of my perl > projects. The helper module should be executed once before all my > tests. I have used prove's -M option. I have stored the helper module > in a dedicated directory called tlib/. Unfortunately prove does not > find the helper module if I use -Itlib. It would be create if the -I > option could be honoured by prove while searching for modules and > plugins.
The -M option is used by prove itself, not by the process used for each individual test. You can use PERL5OPT to get that information into the test processes.
Download (untitled) / with headers
text/plain 878b
Am Mi 13. Nov 2019, 12:20:17, ETHER schrieb: Show quoted text
> On 2019-11-13 00:58:44, SVW wrote:
> > I have developed a helper module that is local to one of my perl > > projects. The helper module should be executed once before all my > > tests. I have used prove's -M option. I have stored the helper module > > in a dedicated directory called tlib/. Unfortunately prove does not > > find the helper module if I use -Itlib. It would be create if the -I > > option could be honoured by prove while searching for modules and > > plugins.
> > The -M option is used by prove itself, not by the process used for > each individual test. You can use PERL5OPT to get that information > into the test processes.
Thanks ETHER. Although your feedback did not convince me completely, it has brought me to another idea. I have simply configured -Mlib=tlib before -MMyPluginModule in the .proverc file.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.