in reply to cpanm install test-dependencies

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.


🦛

Replies are listed 'Best First'.
Re^2: cpanm install test-dependencies
by szabgab (Priest) on Oct 11, 2022 at 08:38 UTC
    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.


      🦛