On Wed, Mar 25, 2015 at 8:47 AM, Tom Browder wrote:
> On Wed, Mar 25, 2015 at 8:29 AM, Moritz Lenz wrote:
>> the indirect method call syntax is the right approach, you just got too
>> many other details wrong to make it work.
This syntax works in a method as you said:
self."$elem"()
Again I
On Wed, Mar 25, 2015 at 8:29 AM, Moritz Lenz wrote:
> the indirect method call syntax is the right approach, you just got too
> many other details wrong to make it work.
Fair enough--my fingers fumbled a few important things. I'll correct
and recheck;
Thanks, Moritz (and Bruce).
Cheers!
-Tom
Hi,
On 25.03.2015 13:44, Tom Browder wrote:
> Given a class like:
>
> our %attrs = (age=>1,wgt=>2);
> class foo { has $.age = rw;}
should be 'has $.age is rw'. The "is" indicates a trait (not an
assignment).
> method a {
> for %attrs.kv -> $k, $v {
> my $aval = self."
# New Ticket Created by Tom Browder
# Please include the string: [perl #124169]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=124169 >
The following test failure occurred upon installation of version
2015.03 of Task::Star (it
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: 74e3d75319e39d1de29ada00edbfb64096cb86c3
https://github.com/perl6/specs/commit/74e3d75319e39d1de29ada00edbfb64096cb86c3
Author: Edwin Steiner
Date: 2015-03-24 (Tue, 24 Mar 2015)
Changed paths:
M S32-
Although it usually works I've seen some oddities (maybe as minor as
one test spec test failure) recently with rakudobrew where it doesn't
cleanly rebuild (i assume there are traces of a previous build
confusing it).
The easiest thing is to delete everything and start again.
S
On 24 March 2015 a
# New Ticket Created by Tom Browder
# Please include the string: [perl #124167]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=124167 >
The Test module almost always reports line 1 for every failure
regardless of which test.
On Mar 25, 2015, at 7:44 AM, Tom Browder wrote:
—snip--
> 1. How can I indirectly refer to the attributes in a method? The
> above doesn't work (with or without the '()’).
—snip—
use v6;
our %attrs = (
age => 1,
# wgt => 2, # Need to handle "No such method" before uncommenting.
);
class
Given a class like:
our %attrs = (age=>1,wgt=>2);
class foo { has $.age = rw;}
method a {
for %attrs.kv -> $k, $v {
my $aval = self."$k"(); # supposed to work for a method name
say "attr { $k } has value '{ $aval }'";
}
}
Question:
1. How can I indirectly refer to the attributes