Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

cpanplus test suite seems to be a bit ruinous

by Intrepid (Deacon)
on May 03, 2025 at 21:01 UTC ( [id://11164925]=perlquestion: print w/replies, xml ) Need Help??

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

The Seekers of Perl Wisdom may not be the best place in the known universe for a bug report, but I know the maintainer of the module I am struggling with, bingos, is active here. So here goes.

The test suite for cpanplus is the creature we need to tame.

I am working with cpanplus v0.9916 and on CygwinPerl v5.40.2

First off, Params::Validate reports an error, exact text shown below, in Dist/MM.pm:

Key 'dir' (t/20_CPANPLUS-Dist-MM.t) is of invalid type for 'CPANPLUS::Internals::Utils::_chdir' provided by CPANPLUS::Dist::MM::create at /cygdrive/c/Users/somia/AppData/Local/.cpanp/.cpanplus/5.40.2/build/nDoXKs5RLj/CPANPLUS-0.9916/t/../lib/CPANPLUS/Dist/MM.pm line 610.

I inserted some dumb simple code to check what is being passed, the output is:

----------------------------------------------------------------------------
Args being passed to Params::Validate: dir|t/20_CPANPLUS-Dist-MM.t
----------------------------------------------------------------------------

I will provide a plate of Buffalo chicken wings to the monk or nun that can work out why that error is appearing. ;-) I've looked and looked and cannot figure it out.

The next matter is equally baffling. I have DBD::SQLite installed to my system but the test suite reports skipping test because "SQLite engine not available":

t/031_CPANPLUS-Internals-Source-SQLite.t ...... skipped: SQLite engine not available
t/032_CPANPLUS-Internals-Source-via-sqlite.t .. skipped: SQLite engine not available

Lastly, the tests in the suite themselves seem to be out of order somehow:

Test Summary Report
-------------------
t/20_CPANPLUS-Dist-MM.t                     (Wstat: 0 Tests: 87 Failed: 77)
  Failed tests:  1, 1, 1, 1, 11-83
  Parse errors: Plan (1..1) must be at the beginning or end of the TAP output
                Tests out of sequence.  Found (1) but expected (11)
                Tests out of sequence.  Found (11) but expected (12)
                Tests out of sequence.  Found (12) but expected (13)
                Tests out of sequence.  Found (13) but expected (14)
Displayed the first 5 of 83 TAP syntax errors.
Re-run prove with the -p option to see them all.
Files=20, Tests=1712, 82 wallclock secs ( 0.34 usr  0.47 sys + 20.69 cusr 50.89 csys = 72.40 CPU)
Result: FAIL
Failed 1/20 test programs. 77/1712 subtests failed.

Anyone able to provide suggestions for how to seek and destroy these annoying errors will have my sincere gratitude.

May 03, 2025 at 21:01 UTC

A just machine to make big decisions
Programmed by fellows (and gals) with compassion and vision
We'll be clean when their work is done
We'll be eternally free yes, and eternally young
Donald Fagen —> I.G.Y.
(Slightly modified for inclusiveness)

  • Comment on cpanplus test suite seems to be a bit ruinous

Replies are listed 'Best First'.
Re: cpanplus test suite seems to be a bit ruinous
by cavac (Prior) on May 05, 2025 at 14:20 UTC

      I forgot that CPAN-cpan uses CPAN::SQLite, cavac, but CPANPLUS-cpan appears not to:

      $ perl -w -MCPANPLUS -le'print "$/$_" for values %INC' | grep CPANPLUS + | xargs -l grep SQLite 'DBD::SQLite' => '0.0', eq 'CPANPLUS::Internals::Source::SQLite'

      As you see above I did a quick-and-dirty grep peek into CPANPLUS and it uses DBD::SQLite.

      Edit

      May 06, 2025 at 17:45 UTC

      I've done a bit more poking around in the code to see if I can get cpanplus to use SQLite. I discovered that the line found above by grep, 'DBD::SQLite' => '0.0',, is preceded by the line containing 'DBIx::Simple' => '0.0',. I installed DBIx::Simple and the result is that when I make test on CPANPLUS it seems happy to use SQLite. Here's a part of the code I'm talking about, in /CPANPLUS/Selfupdate.pm:

      sqlite_backend => [ { 'DBIx::Simple' => '0.0', 'DBD::SQLite' => '0.0', }, sub { my $cb = shift; my $conf = $cb->configure_object; return $conf->get_conf('source_engine') eq 'CPANPLUS::Internals::Source::SQLite' },

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2025-05-25 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.