NAME
Mojolicious::Plugin::Fondation::Setup::MetaCPAN - MetaCPAN discovery for Fondation plugins
VERSION
version 0.01
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,
}
is_installed
my $bool = $mc->is_installed('Mojolicious::Plugin::Fondation::Blog');
Returns true if the Perl class can be loaded via require.
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.