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

I ran into this problem looking up module versions with fastapi on metacpan:
% perl -MHTTP::Tiny -MJSON::PP -le 'print decode_json(HTTP::Tiny->new- +>get("https://fastapi.metacpan.org/v1/module/" . shift)->{content})-> +{version}' Encode 3.21 perl -MHTTP::Tiny -MJSON::PP -le 'print decode_json(HTTP::Tiny->new->g +et("https://fastapi.metacpan.org/v1/module/" . shift)->{content})->{v +ersion}' Config <NOTHING GETS PRINTED>
Results from direct access:
fastapi.metacpan.org/v1/module/Encode { "abstract" : "character encodings in Perl"... fastapi.metacpan.org/v1/module/Config { "code" : 404, "message" : "Not found" }

Replies are listed 'Best First'.
Re: metacpan fastapi can't find the Config module
by hippo (Archbishop) on Apr 16, 2026 at 09:11 UTC

    fastapi returns a 404 code when you request info on a module which doesn't exist on CPAN. This is by design.

    You say you ran into a problem but I'm not seeing any problem in what you have provided. fastapi is behaving as it should in these circumstances. Can you elaborate further on the nature of your problem?


    🦛

Re: metacpan fastapi can't find the Config module
by LanX (Saint) on Apr 15, 2026 at 14:50 UTC
    What's the question?

    If it was is a bug you should file a bug report.

    But my guess is that you meant config which is lower case.

    Edit

    Ugh ... That's not the config I meant and a rather unfortunate naming ...

    I suppose the Config.pm that ships with core Perl is simply not mirrored on CPAN, try Config.

    Update

    Which makes sense since the hardcoded values inside the %Config hash highly depend on the actual built with config.sh . IOW it's more of a glorified log with interface created during the built of the perl.exe ...

    Installing from CPAN wouldn't make sense.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

Re: metacpan fastapi can't find the Config module
by InfiniteSilence (Curate) on Apr 19, 2026 at 19:48 UTC

    I'm with hippo; not sure why you are doing this but here are some ideas.

    First, MetaCPAN has its own module. Borrowed directly from MetaCPAN::Client's own Pod:

    #Or, to get either the given version of a release, or the latest: my $releases = $mcpan->release( { all => [ { distribution => 'GraphViz2' }, ($version ? { version => $version } : { status => 'latest' }), ], } );

    My guess is that you are trying to find out what is latest and greatest with a module. If you are not doing that perhaps you should be trying to ensure that you have the correct version installed. There are modules specifically designed for this but, to me, unless a script has no dependencies I simply do not see why people do not write up some actual tests.

    #!/bin/bash perl -MTest::More=no_plan -e 'my $prio = shift; if (use_ok(qq~$prio~)) + { no strict q~refs~; print ${$prio . qq~::VERSION~} . qq~\n~} else { +print qq~WTF!!!!!!\n\n~};' Exporter

    Prints...

    ok 1 - use Exporter; 5.78 1..1

    Whereas...

    perl ... BLAHMODULE

    Prints...

    not ok 1 - use BLAHMODULE; ... WTF!!!!!!

    The above is actualy bad usage but I wanted to demonstrate that you can check for versions on the command line via passing in the module name. The use_ok() method in Test::More takes a version:

    use_ok(qq~CGI~,9.999);

    Which fails, of course, because that is not the installed version.

    Celebrate Intellectual Diversity