Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

cpanm install test-dependencies

by szabgab (Priest)
on Oct 11, 2022 at 07:59 UTC ( [id://11147339]=perlquestion: print w/replies, xml ) Need Help??

szabgab has asked for the wisdom of the Perl Monks concerning the following question:

cpanm --installdeps .
installs the dependencies listed in the local Makefile.PL, but it seems it does not install the dependencies that are marked as "TEST_REQUIRES" nor the ones listed as "tests suggests". Is there a way to ask "cpanm" to install those module as well?

Replies are listed 'Best First'.
Re: cpanm install test-dependencies
by Haarg (Priest) on Oct 11, 2022 at 09:02 UTC
    All of your test runs show an error when trying to run the variations of cpanm --installdeps .:
    ! No MYMETA file is found after configure. Your toolchain is too old?
    This is because the Makefile.PL includes the option:
    NO_MYMETA => 1,
    If you remove that option, --installdeps will start working.
Re: cpanm install test-dependencies
by hippo (Archbishop) on Oct 11, 2022 at 08:27 UTC

    The POD for cpanm says:

    --with-develop

    EXPERIMENTAL: Installs develop phase dependencies in META files or cpanfile when used with --installdeps. Defaults to false.

    Does testing fall under "develop phase"? Might be worth a shot. There's also --with-suggests for those optional deps.


    🦛

      Thanks for the suggestion. Unfortunately that did not seem to help. You can see the results I got here

        Instead of debugging all that, here's my SSCCE showing --installdeps happily trying to install the test requirements. I've intentionally used deps which don't exist.

        $ ls cpanfile $ cat cpanfile on 'test' => sub { requires 'Nosuch', '1.0'; suggests 'Stillno', '1.0'; }; $ cpanm -S --installdeps . --> Working on . Configuring /tmp/testreq ... OK ==> Found dependencies: Nosuch ! Finding Nosuch (1.0) on mirror https://cpan.metacpan.org failed. ! Couldn't find module or a distribution Nosuch (1.0) ! Installing the dependencies failed: Module 'Nosuch' is not installed ! Bailing out the installation for .. $

        Hopefully you can use this as a starting point to see why your deps are being ignored.


        🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11147339]
Approved by LanX
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2025-02-13 18:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found