Re: What is my sub?

2018-05-21 Thread Siavash
https://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3423.html On 2018-05-22 06:04:47 GMT, ToddAndMargo wrote: > Hi All, > > I need to know the name of the subroutine I am in. > > This is the way I use to do it in Perl 5: > > (my $Name = (caller(0))[3] ) ~~ s{.*::}{}; > > How do I

What is my sub?

2018-05-21 Thread ToddAndMargo
Hi All, I need to know the name of the subroutine I am in. This is the way I use to do it in Perl 5: (my $Name = (caller(0))[3] ) ~~ s{.*::}{}; How do I do it in Perl 6? Many thanks, -T

regex and metacharacters

2018-05-21 Thread ToddAndMargo
Hi All, With the help of the guys on the chat line, I learned something new. How do deal with metacharacter(s) in a regex. To match a metacharacter: "<" and "?" in this example: $ p6 'if "

=begin comment as replacement for =begin data

2018-05-21 Thread Marcel Timmerman
Hi, I was trying to find a way to have data stored in the program script itself a la perl5 __DATA__. Perl6 has the =data pod structures to do that. But after a first test I got an error using $=data saying that it was not yet implemented. But, as the saying goes, there's more than one way to

[perl #127143] Different Behaviour With/Without Commas in Sub/Method Calls and slipped hashes

2018-05-21 Thread Brian S. Julin via RT
On Mon, 21 May 2018 09:13:15 -0700, b...@abrij.org wrote: > Note if we fix | to use fake infix adverbs, then we create the problem > that |(1,1),(2,2),:f :g will be 1,1,:g,(2,2),:f. ...sorry that might be OK due to the "first pair in term position"... but |(1,1),(2,2),1 :g will be 1,1,:g,(2,2),

[perl #127143] Different Behaviour With/Without Commas in Sub/Method Calls and slipped hashes

2018-05-21 Thread Brian S. Julin via RT
Without the comma, the colonpair is in infix position, which means it applies to the prefix unary | operator. So whether this should be an error or "work" depends on what we can teach the | operator to do with fake_infix adverbs it is passed. Note if we fix | to use fake infix adverbs, then we