NAME
Mojolicious::Plugin::Fondation::Setup::MetaCPAN - MetaCPAN discovery for Fondation plugins
VERSION
version 0.02
SYNOPSIS
my $mc = Mojolicious::Plugin::Fondation::Setup::MetaCPAN->new;
$mc->discover_p($app)->then(sub ($plugins) {
for my $p (@$plugins) {
say "$p->{module_class} — $p->{abstract}";
say " installed: " . ($p->{installed} ? 'yes' : 'no');
}
});
NAME
Mojolicious::Plugin::Fondation::Setup::MetaCPAN — MetaCPAN discovery for Fondation plugins
METHODS
discover_p
my $promise = $mc->discover_p($app);
Queries MetaCPAN for all releases whose distribution starts with Mojolicious-Plugin-Fondation-. Deduplicates by distribution name (showing the latest version only). Derives the Perl module class from the distribution name.
Returns a Mojo::Promise resolving to an arrayref of hashrefs:
{
distribution => 'Mojolicious-Plugin-Fondation-Blog',
version => '0.01',
abstract => 'Blog plugin for Fondation',
author => 'DAB',
date => '2026-06-15',
module_class => 'Mojolicious::Plugin::Fondation::Blog',
installed => $bool,
}
installed_version
my $version = $mc->installed_version('Mojolicious::Plugin::Fondation::Blog');
Returns the installed version string if the class is loadable and has a $VERSION, or undef if not installed.
SEE ALSO
Mojolicious::Plugin::Fondation::Setup, https://metacpan.org
AUTHOR
Daniel Brosseau <dab@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Daniel Brosseau.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.