NAME
Mojolicious::Plugin::Fondation::Command::fondation - Fondation orchestration commands -- init, upgrade, refresh
VERSION
version 0.01
SYNOPSIS
$ myapp.pl fondation init
$ myapp.pl fondation upgrade
$ myapp.pl fondation refresh
DESCRIPTION
Provides init, upgrade, refresh, and plan commands that iterate over all loaded Fondation plugins and execute the steps each plugin declares in its fondation_meta.
Plugin contract
Plugins declare their participation via fondation_meta - defaults>:
sub fondation_meta {
return {
defaults => {
fondation_init => [ ['db', 'prepare', '-y'], ['db', 'install'] ],
fondation_upgrade => [ ['db', 'prepare', '-y', '-a'], ['db', 'upgrade'] ],
fondation_clean => ['data/app.db'],
},
};
}
All three keys are optional -- a plugin only declares what it needs. Because they live in defaults, they participate in the config merge cascade (direct > app config > defaults). Users can override or extend them just like any other Fondation config value.
fondation_init-- array of command steps, each[command, args...]fondation_upgrade-- array of command steps for incremental upgradefondation_clean-- array of paths (relative to app home) to remove
Commands
fondation plan
Dry-run preview that shows what init, upgrade, or refresh would execute without actually running any steps.
$ myapp.pl fondation plan init
$ myapp.pl fondation plan upgrade
$ myapp.pl fondation plan refresh
Output shows each plugin (by short name) and its steps or clean targets, in load order. A summary line at the end gives plugin and step counts.
fondation init
Iterates over plugins in load order. For each plugin that declares fondation_init, runs each step via $app->commands->run(@step).
fondation upgrade
Same as init, but uses fondation_upgrade from each plugin.
fondation refresh
NAME
Mojolicious::Plugin::Fondation::Command::fondation - Orchestrate Fondation plugins
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.