rw optional parameters

2017-09-16 Thread Norman Gaywood
I have this: #!/usr/bin/perl6 use v6; sub MAIN( :$debug = False, :$verbose = False ) { $verbose = True if $debug; say "verbose={$verbose}, debug={$debug}"; } $ ./tt.p6 verbose=False, debug=False $ ./tt.p6 --verbose verbose=True, debug=False $ ./tt.p6 --debug Cannot assign to a readonly var

Re: What is P6 for P5 `use Term::ReadKey`?

2017-09-16 Thread Timo Paulssen
On 16/09/17 05:19, ToddAndMargo wrote: > On 09/13/2017 01:36 PM, Trey Harris wrote: >> L1 is an “ordinary method” (denoted, obviously enough, with the >> declarator |method|), which as described in the Typesystem >> doc, “defines >> objects of ty

Re: rw optional parameters

2017-09-16 Thread Elizabeth Mattijsen
> On 16 Sep 2017, at 13:32, Norman Gaywood wrote: > > I have this: > #!/usr/bin/perl6 > use v6; > sub MAIN( :$debug = False, :$verbose = False ) { > $verbose = True if $debug; > say "verbose={$verbose}, debug={$debug}"; > } > $ ./tt.p6 > verbose=False, debug=False > $ ./tt.p6 --verbose

Re: rw optional parameters

2017-09-16 Thread Norman Gaywood
On 16 September 2017 at 23:29, Elizabeth Mattijsen wrote: > > > On 16 Sep 2017, at 13:32, Norman Gaywood wrote: > > sub MAIN( :$debug = False, :$verbose is rw = False ) { > > ... > > $ ./tt.p6 --debug > > ===SORRY!=== Error while compiling /home/ngaywood/./tt.p6 > > Cannot use 'is rw' on option