Re: The equivalent of Moose's "around"

2017-11-17 Thread Elizabeth Mattijsen
> On 17 Nov 2017, at 22:47, Elizabeth Mattijsen wrote: >> On 17 Nov 2017, at 20:09, Fernando Santagata >> wrote: >> I tried to use the code you suggested: >> >> sub trait_mod:(Attribute:D \attribute, :&proxy!) { >> attribute.package.^add_method(attribute.name, my method () { proxy($_) }) >> }

Re: The equivalent of Moose's "around"

2017-11-17 Thread Elizabeth Mattijsen
> On 17 Nov 2017, at 20:09, Fernando Santagata > wrote: > I tried to use the code you suggested: > > sub trait_mod:(Attribute:D \attribute, :&proxy!) { > attribute.package.^add_method(attribute.name, my method () { proxy($_) }) > } > > class A { > has $!a is proxy({ $^a * 2 }); > has $!b

Re: The equivalent of Moose's "around"

2017-11-17 Thread Elizabeth Mattijsen
> On 17 Nov 2017, at 20:09, Fernando Santagata > wrote: > I tried to use the code you suggested: > > sub trait_mod:(Attribute:D \attribute, :&proxy!) { > attribute.package.^add_method(attribute.name, my method () { proxy($_) }) > } > > class A { > has $!a is proxy({ $^a * 2 }); > has $!b

[perl #132447] IO.slurp throws exception when run in threads

2017-11-17 Thread Zoffix Znet via RT
On Fri, 17 Nov 2017 09:26:10 -0800, d...@zwell.net wrote: > After more careful checking, I found the bug fix did make it into the > October release. A bisect showed it was fixed it in > commit 6af44f8d38a02bbd0d68cfd014165d6e33e4d89a. > [...] > Slurping on the file handle you described still produc

[perl #132447] IO.slurp throws exception when run in threads

2017-11-17 Thread Zoffix Znet via RT
On Fri, 17 Nov 2017 09:26:10 -0800, d...@zwell.net wrote: > After more careful checking, I found the bug fix did make it into the > October release. A bisect showed it was fixed it in > commit 6af44f8d38a02bbd0d68cfd014165d6e33e4d89a. > [...] > Slurping on the file handle you described still produc

[perl #131478] Warning about $. when using metamethod

2017-11-17 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
I'm guessing that this now needs tests? On 2017-10-07 07:35:53, b...@abrij.org wrote: > On Thu, 01 Jun 2017 16:07:41 -0700, ju...@tnx.nl wrote: > > code: > > > > class Command { method Str { "<$.^name>" } } > > # or even just: > > class Command { method Str { $.^name } } > > > > gives: > > > > Uns

Re: The equivalent of Moose's "around"

2017-11-17 Thread Fernando Santagata
Hi Liz, I tried to use the code you suggested: sub trait_mod:(Attribute:D \attribute, :&proxy!) { attribute.package.^add_method(attribute.name, my method () { proxy($_) }) } class A { has $!a is proxy({ $^a * 2 }); has $!b is proxy({ $^a * 3 }); } my A $a .= new; $a.a = 21;# <-- No su

Re: [perl #132447] IO.slurp throws exception when run in threads

2017-11-17 Thread Dan Zwell via RT
After more careful checking, I found the bug fix did make it into the October release. A bisect showed it was fixed it in commit 6af44f8d38a02bbd0d68cfd014165d6e33e4d89a. So, in the prior commit, the --version 2017.09-490-g3f595acfb built on MoarVM version 2017.10, and the exception (with --ll-exce

Re: [perl #132447] IO.slurp throws exception when run in threads

2017-11-17 Thread Dan Zwell
After more careful checking, I found the bug fix did make it into the October release. A bisect showed it was fixed it in commit 6af44f8d38a02bbd0d68cfd014165d6e33e4d89a. So, in the prior commit, the --version 2017.09-490-g3f595acfb built on MoarVM version 2017.10, and the exception (with --ll-exce