#! /usr/bin/env raku use App::Cal; my $common-args = :(Bool :$h, Bool :$n, Bool :$w); multi sub MAIN(|options where $common-args) { say render-month(|options); } multi sub MAIN($month, $year, |options where $common-args) { if $month ~~ Int { say render-month(:$year, :$month, |options); } else { say render-month(:$year, :month(::Months::($month.tc)), |options); } } multi sub MAIN($single, |options where $common-args) { if $single ~~ Int { say render-month(:month($single), |options) if $single <=12; say render-year( :year($single), |options) if $single >12; } else { say render-month(:month(::App::Cal::Months::($single.tclc)), |options); } }