Help language development. Donate to The Perl Foundation

App::Mi6 cpan:SKAJI last updated on 2022-03-13

#!/usr/bin/env raku
use App::Mi6;

my %*SUB-MAIN-OPTS = :named-anywhere;
my $app =;

multi MAIN("version") {
    say $app.dist.meta<version>;
multi MAIN("new", $module, :fez(:$zef)) {
    $app.cmd("new", $module, :$zef);
multi MAIN("build") {
multi MAIN("test", *@file, Bool :v(:$verbose), Int :j(:$jobs)) {
    $app.cmd("test", @file, :$verbose, :$jobs);
multi MAIN("release", Bool :k(:$keep), Str :$next-version, Bool :$yes) {
    $app.cmd("release", :$keep, :$next-version, :$yes);
multi MAIN("dist", Bool :$no-top-directory) {
multi MAIN("upload") {
    die "`mi6 upload` is removed, please execute `mi6 release` instead.\n";
multi MAIN("help") {
multi MAIN(:h(:$help)!) {
sub USAGE {
    require Pod::To::Text;
    exit 1;

=begin pod

=head1 USAGE

  $ mi6 new Foo::Bar # create Foo-Bar distribution
  $ mi6 build        # build the distribution, and re-generate
  $ mi6 test         # run tests
  $ mi6 release      # release your distribution tarball to CPAN
  $ mi6 version      # show mi6 version
  $ mi6 help         # show this help


  $ mi6 new Foo::Bar
    Create Foo-Bar distribution

      --zef, --fez  create distribution for Zef ecosystem

  $ mi6 build
    Build the distribution, and re-generate
    Here 'build' means if is present, then execute it, otherwise nothing happens.


  $ mi6 test [test files/directory]
    Run tests

     -v, --verbose   print all test lines
     -j, --jobs=N    run N test jobs in parallel

  $ mi6 release
    Create tarball for your distribution, and release it to CPAN.
    You should prepare ~/.pause file before releasing.

     -k, --keep          do not delete local tarball after releasing it to CPAN
         --next-version  set next release version manually
         --yes           do not raise prompt; accept the default behavior

  $ mi6 version
    Show mi6 version


  $ mi6 help, mi6 --help
    Show this help

     -h, --help   show this help

=end pod