Last active
November 29, 2018 17:06
-
-
Save ufobat/cea6b00f1020640a9eda776fccf616da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6 main.pl6 --aa=b --fasdfasd=234 store foo --no-ja=ja | |
{aa => b, fasdfasd => 234, no-ja => ja} | |
$ perl6 -I. -e 'use My::Main' --aa=b --fasdfasd=234 store foo --no-ja=ja | |
Usage: | |
-e '...' [--<tags>=...] store <filename> | |
$ diff main.pl6 My/Main.pm6 | |
2a3 | |
> diff main.pl6 My/Main.pm6 | |
2a3 | |
> unit module My::Main; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6.c; | |
my %*SUB-MAIN-OPTS = ( 'named-anywhere' => True); | |
multi sub MAIN() is export { | |
say 1; | |
} | |
multi sub MAIN('show', 'unprocessed') is export { | |
say 2; | |
} | |
multi sub MAIN('show', 'store') is export { | |
say 3; | |
} | |
multi sub MAIN('dump', 'config') is export { | |
say 4; | |
} | |
multi sub MAIN('dump', 'projects') is export { | |
say 5; | |
} | |
multi sub MAIN('store', Str:D $filename, *%tags) is export { | |
say %tags; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6.c; | |
unit module My::Main; | |
our %*SUB-MAIN-OPTS is export = ( 'named-anywhere' => True); | |
multi sub MAIN() is export { | |
say 1; | |
} | |
multi sub MAIN('show', 'unprocessed') is export { | |
say 2; | |
} | |
multi sub MAIN('show', 'store') is export { | |
say 3; | |
} | |
multi sub MAIN('dump', 'config') is export { | |
say 4; | |
} | |
multi sub MAIN('dump', 'projects') is export { | |
say 5; | |
} | |
multi sub MAIN('store', Str:D $filename, *%tags) is export { | |
say %tags; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment