We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The snippet you showed from your Makefile.PL suggests you're using ExtUtils::MakeMaker. EU::MM provides several hooks that enable you to specify module dependencies for different stages in your module's life. If you have a dependency that has to be installed before Makefile.PL can run on the target system, you specify it as a CONFIGURE_REQUIRES option. An example of such a need is Math::Prime::FastSieve, where Inline::MakeMaker has to be installed on the target system, as well as a relatively recent version of EU::MM before the target system runs Makefile.PL. By listing those types of dependencies in a CONFIGURE_REQUIRES parameter, the module author, upon building the distribution tells EU::MM to place a configure_requires section in META.yml and META.json. META.yml is used by the cpan shell (as well as the other common install tools) to determine the dependencies. The cpan shell will see that the CONFIGURE_REQUIRES dependency is there, and will install it before invoking Makefile.PL. CONFIGURE_REQUIRES doesn't affect the makefile, it affects what modules are available to Makefile.PL. Ok, that's CONFIGURE_REQUIRES. That's not the stage you need to affect. I just mention it as an example. You need to have a dependency in place before the tests are run. There is no TEST_REQUIRES parameter. But there is a BUILD_REQUIRES, which will get the dependency installed in time for the build process. Technically your module is already built before it's tested, but that detail isn't as important. Of course PREREQ_PM is the final opportunity to list dependencies, but that isn't what you need here, as that parameter is intended to get a module dependency installed, not a testing/building dependency. My own experience in this area is partially documented in the thread that someone else already identified here: Clean smoke-test install for Inline based modules using Inline::MakeMaker Just keep in mind the following:
As usual, I'm sure if I've misstated something or left something out another helpful individual here will fill in those blanks. :) Dave In reply to Re: How to specify tests dependencies with Makefile.PL?
by davido
|
|