Re: Creating an array of a single hash

2017-06-01 Thread Gabor Szabo
On Thu, Jun 1, 2017 at 5:44 PM, Timo Paulssen wrote: > Yeah, you can use the prefix $ to itemize things, like so: > > timo@schmand ~> perl6 -e 'my @y = ${ name => "Foo" }; say @y.gist; > say @y.^name; say @y[0].^name' > [{name => Foo}] > Array > Hash > > HTH > - Timo Thanks.

Re: Creating an array of a single hash

2017-06-01 Thread Timo Paulssen
Yeah, you can use the prefix $ to itemize things, like so: timo@schmand ~> perl6 -e 'my @y = ${ name => "Foo" }; say @y.gist; say @y.^name; say @y[0].^name' [{name => Foo}] Array Hash HTH - Timo

Creating an array of a single hash

2017-06-01 Thread Gabor Szabo
use v6; my @x = { name => "Foo" }, { name => "Bar"} say @x.gist; # [{name => Foo} {name => Bar}] say @x.^name;# Array say @x[0].^name; # Hash my @y = { name => "Foo" } say @y; # [name => Foo] say @y.^name; # Array say @y[0].^name; # Pair my @z = { name => "Foo" },; say @z;

Re: list named argument in MAIN

2017-06-01 Thread Marcel Timmerman
On 06/01/2017 03:03 PM, H.Merijn Brand wrote: On Thu, 1 Jun 2017 14:11:47 +0200, Timo Paulssen wrote: It seems like this only works if you supply --dirs= multiple times perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1 --dirs=d2 --dirs=d3 d1 d2 d3 took

Re: list named argument in MAIN

2017-06-01 Thread H.Merijn Brand
On Thu, 1 Jun 2017 14:11:47 +0200, Timo Paulssen wrote: > It seems like this only works if you supply --dirs= multiple times > > perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1 > --dirs=d2 --dirs=d3 > > d1 > d2 > d3 took me a bit as it needs both .List *and*

Re: list named argument in MAIN

2017-06-01 Thread Marcel Timmerman
On 06/01/2017 02:11 PM, Timo Paulssen wrote: It seems like this only works if you supply --dirs= multiple times perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1 --dirs=d2 --dirs=d3 d1 d2 d3 HTH - Timo Thanks Timo, Just tested this and it works. But t

Re: list named argument in MAIN

2017-06-01 Thread Timo Paulssen
It seems like this only works if you supply --dirs= multiple times perl6 -e 'sub MAIN (List :$dirs=[]) { .say for @$dirs }' --dirs=d1 --dirs=d2 --dirs=d3 d1 d2 d3 HTH - Timo

list named argument in MAIN

2017-06-01 Thread Marcel Timmerman
Hi, How can I read a list of items from the command line. Something like; mkdir.pl6 --dirs=d1,d2,d3 I thought I could do something like; sub MAIN (List :$dirs=[]) { mkdir($_) for @$dirs; } But it keeps displaying the usage message Greetings, Marcel

Re: Is there a linter for Perl 6? (like Perl::Critic or pylint)

2017-06-01 Thread Ahmad Zawawi
Hi Gabor, Like https://atom.io/packages/atom-perl6-editor-tools for instance or project-level linting? Regards, Ahmad On Thu, Jun 1, 2017 at 9:02 AM, Gabor Szabo wrote: > e.g. I'd like to check that every pl pm and t file in our project has a > "use v6;" at the beginning. > > regards >Gab

Re: ding!

2017-06-01 Thread Brent Laabs
The lack of sound is probably from your terminal. For instance, iTerm2.app has the "Silence Bell" option in Preferences > Profiles. On macOS, this makes a ding noise: perl6 -e 'run ' or perl6 -e 'run ' On Wed, May 31, 2017 at 9:18 PM, ToddAndMargo wrote: > On 05/31/2017 09:11 PM, Peter Scott w