Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created April 23, 2016 15:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/66923e10847d2b96b17d08e0b68a5c33 to your computer and use it in GitHub Desktop.
Save tadzik/66923e10847d2b96b17d08e0b68a5c33 to your computer and use it in GitHub Desktop.
┌─[tadzik@yavin]─[~/src/github/tadzik/Getopt-Type]
└─[%]─> cat test.pl
use Getopt::Type;
sub MAIN(*%opts where getopt(<f|force v|verbose>)) {
say "Forcing!" if %opts<force>;
say "Verbosing!" if %opts<verbose>;
say %opts.perl;
}
┌─[tadzik@yavin]─[~/src/github/tadzik/Getopt-Type]
└─[%]─> perl6 -Ilib test.pl -fv
Forcing!
Verbosing!
{:f, :force, :v, :verbose}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment