Re: use Moo:from;

2018-09-06 Thread Simon Proctor
Well I got a bit further but I am also thinking about how I'd do it. On Thu, 6 Sep 2018, 14:47 Vadim Belman, wrote: > > > 1. There is currently a bug (or bugs) about wrapped methods – > https://github.com/rakudo/rakudo/issues/2178 > get_value() is unlikely to be wrapped. But potential issues are

Re: use Moo:from;

2018-09-06 Thread Vadim Belman
> 1. There is currently a bug (or bugs) about wrapped methods – > https://github.com/rakudo/rakudo/issues/2178 > > get_value() is unlikely to be wrapped. But potential issues are possible as > it seems that the bug is not only related to method i

Re: use Moo:from;

2018-09-06 Thread Vadim Belman
Here is the problematic points of your code: 1. There is currently a bug (or bugs) about wrapped methods – https://github.com/rakudo/rakudo/issues/2178 get_value() is unlikely to be wrapped. But potential issues are possible as it seems that the bug is not only related to method inheritance. 2

Re: use Moo:from;

2018-09-06 Thread Simon Proctor
Done a bit of noodling about this morning and I got this. And it works sort of. .perl calls the get_value method but the accessor and private value reads don't. (I'm guessing this is what you came up against Vadim?) Still the self deleting wrapper is a fun trick. Best I do some work now thoug

Re: use Moo:from;

2018-09-05 Thread Vadim Belman
Looking forward to see what you come up with. I do mix in a role into both Attribute and ClassHOW. But delving into the core didn't help to find a better approach than the one I finally took. Two subtle aspects are to be kept in mind: support for roles; and knowing the object attribute is belong

Re: use Moo:from;

2018-09-05 Thread Elizabeth Mattijsen
for the purpose I had to create > MooX::AtttributeFilter, but that's another story...) > > > 5 вер. 2018 р. о 10:43 Ralph Mellor написав(ла): > > > > This is another follow up to Vadim's post. > > > > Vadim, you didn't touch upon the `use Moo:

Re: use Moo:from;

2018-09-05 Thread Simon Proctor
to create MooX::AtttributeFilter, but that's another story...) > > > 5 вер. 2018 р. о 10:43 Ralph Mellor > написав(ла): > > > > This is another follow up to Vadim's post. > > > > Vadim, you didn't touch upon the `use Moo:from;` approach. > >

Re: use Moo:from;

2018-09-05 Thread Vadim Belman
nd for the purpose I had to create MooX::AtttributeFilter, but that's another story...) > 5 вер. 2018 р. о 10:43 Ralph Mellor написав(ла): > > This is another follow up to Vadim's post. > > Vadim, you didn't touch upon the `use Moo:from;` approach. > >

use Moo:from;

2018-09-05 Thread Ralph Mellor
This is another follow up to Vadim's post. Vadim, you didn't touch upon the `use Moo:from;` approach. As you noted, you wanted to avoid P5. And you've already created AttrX::Moo. So perhaps you see anything related to Inline::Perl5 as doubly moot. Regardless, I really would lo