Re: I need help with sub MAIN

2020-05-10 Thread ToddAndMargo via perl6-users
On 2020-05-05 12:28, yary wrote: Oops my example was missing the important $*USAGE message. And it makes sense to show the wrong named args before the wrong list args. example.raku:   multi sub MAIN(:$these ="These", :$are="Are") { say "$these $are"; };   multi sub MAIN(*@wrong-list,:$these =

Re: I need help with sub MAIN

2020-05-05 Thread yary
Oops my example was missing the important $*USAGE message. And it makes sense to show the wrong named args before the wrong list args. example.raku: multi sub MAIN(:$these ="These", :$are="Are") { say "$these $are"; }; multi sub MAIN(*@wrong-list,:$these ="These", :$are="Are",*%wrong-named) is

Re: I need help with sub MAIN

2020-05-05 Thread yary
Here's something to play with (without explanation from me, busy enough sorry!) example.raku: multi sub MAIN(:$these ="These", :$are="Are") { say "$these $are"; }; multi sub MAIN(*@wrong-list,:$these ="These", :$are="Are",*%wrong-named) is hidden-from-USAGE {say "Got bad args " ~ @wrong-l

Re: I need help with sub MAIN

2020-05-05 Thread ToddAndMargo via perl6-users
On Tue, 5 May 2020, 06:46 ToddAndMargo via perl6-users, mailto:perl6-us...@perl.org>> wrote: Hi All, Just to prove I read the stinker: https://docs.raku.org/routine/MAIN I am trying to get the following to do #!/usr/bin/env perl6 sub MAIN(:$these ="These", :$are="Are")

Re: I need help with sub MAIN

2020-05-05 Thread Simon Proctor
I would suggest starting by reading this page in the docs : https://docs.raku.org/language/create-cli Covers how $*USAGE is created and the various options you have for providing help data. On Tue, 5 May 2020, 06:46 ToddAndMargo via perl6-users, < perl6-us...@perl.org> wrote: > Hi All, > > Just

I need help with sub MAIN

2020-05-04 Thread ToddAndMargo via perl6-users
Hi All, Just to prove I read the stinker: https://docs.raku.org/routine/MAIN I am trying to get the following to do #!/usr/bin/env perl6 sub MAIN(:$these ="These", :$are="Are") { say "$these $are"; } This is working: $ MainTest.pl6 --are=our --these=those those our These two are not: 1) I