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

When installing via cpan/cpanm I sometimes get test failures. From the command prompt (not cpan/m) how can I run the test suites with perl -d so I can debug?
  • Comment on CPAN Modules debugging - run test suites from command line

Replies are listed 'Best First'.
Re: CPAN Modules debugging - run test suites from command line
by tospo (Hermit) on Apr 30, 2014 at 13:34 UTC
    Download the tarball of the module and extract it and cd into the created directory. You can run any individual test with
    perl -Ilib -d t/SOME_TEST_FILE
Re: CPAN Modules debugging - run test suites from command line
by salva (Canon) on Apr 30, 2014 at 15:41 UTC
    Nowadays it is common for CPAN modules to have its version control repository hosted on some public service as GitHub.

    If you plan to fix the bug and send a patch to the author, it would be far easier if you use that repository from the beginning.

Re: CPAN Modules debugging - run test suites from command line
by Bloodnok (Vicar) on Apr 30, 2014 at 15:17 UTC
    cd inst_dir perl Makefile.PL make test
    usually does the trick for me ... assuming that it [the module] has been created by h2xs.
    A user level that continues to overstate my experience :-))