Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created January 26, 2016 22:46
Show Gist options
  • Save hoelzro/7fd925b4f4617a5c46b5 to your computer and use it in GitHub Desktop.
Save hoelzro/7fd925b4f4617a5c46b5 to your computer and use it in GitHub Desktop.
our sub MAIN_HELPER($retval = 0) is export {
say "doing getopty stuff!";
my $m = callframe(1).my<&MAIN>;
return $retval unless $m;
say 'calling MAIN with no args';
$m();
}
use v6;
use Getopt;
sub MAIN() {
say 'The rain in MAIN falls mainly on the plain';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment