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

I don't see a better place than SoPW at the Monastery to put this so I'll just dump it here and see what happens.

Just a simple inquiry: I just ran cpan (not cpanplus, which I post about a lot); I entered the command r for "reporting outdated/upgradeable modules" and cpan reported 92 unparseable module versions. Whoa. That makes me want to ask: is it really that difficult to write a package with a sane / parseable version? Or is cpan's programmatic notions of "parseable" odd or too strict? Opinions and knowledge welcomed.

  Soren

Jul 05, 2025 at 17:47 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 Package VERSIONs not parseable by the cpan module

Replies are listed 'Best First'.
Re: Package VERSIONs not parseable by the cpan module
by choroba (Cardinal) on Jul 05, 2025 at 18:10 UTC
    Have you tried
    o conf show_unparsable_versions
    and rerunning the r command?

    On my machine, there are 526 such modules. Most of them seem to be helper (sub)modules in distributions, not installable without the main module, e.g.

    Module < Test::Deep::Methods (RJBS/Test-Deep-1.205.tar.gz) Module = App::Ack::Filter::Collection (PETDANCE/ack-v3.9.0.tar.gz) Module = Plack::Handler::HTTP::Server::PSGI (MIYAGAWA/Plack-1.0051.ta +r.gz)
    while some others are really weird, e.g.
    Module = overload::numbers (BOOK/perl-5.42.0.tar.gz)
    (I'm running this in 5.26.1 and I don't have 5.42.0 installed: I use 5.43.0 instead when experimenting with the new stuff). Update: The message probably shows the latest version at CPAN, which is 5.42.0. The module itself doesn't define a version:
    $ perl -Moverload::numbers\ 999 -e1 overload::numbers does not define $overload::numbers::VERSION--version + check failed. BEGIN failed--compilation aborted.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      choroba wrote:

        Have you tried

      o conf show_unparsable_versions
      ...
      $ perl -Moverload::numbers\ 999 -e1
      

      First of all I'll comment on the line of code above: as far as I can recall, I've never seen that usage for checking module versions, and it's kind of cool. I have always simply used:

      $ perl -Moverload::numbers -e 'print $overload::numbers::VERSION'
      

      I like your method better, not least because it's shorter to type.

      And, as far as the configuration setting show_unparsable_versions, I did set that before using the r command the second time. Without that setting, cpan just ignores unversioned modules with the message: NNN installed modules have no parsable version number (where "NNN" varies by installation).

      Jul 08, 2025 at 16:54 UTC