unit module Clap; say "Loading clap..."; class Subcommand is export { has Str $.name; has Str $.about is rw; method with_name(Str $name) returns Subcommand { return self.bless(:$name); } method about(Str $about) returns Subcommand { $!about = $about; return self; } } class App is export { has Str $.about is rw; has Str $.author is rw; has @.subs is rw = Array.new(); method about(Str $about) returns App { $!about = $about; return self; } method author(Str $author) returns App { $!author = $author; return self; } method subcommand(Subcommand $cmd) returns App { @.subs.push($cmd); return self; } }