Re: How to get indirect access to a class attribute?

2015-03-25 Thread Tom Browder
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

Re: How to get indirect access to a class attribute?

2015-03-25 Thread Tom Browder
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

Re: How to get indirect access to a class attribute?

2015-03-25 Thread Moritz Lenz
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."

[perl #124169] [BUG] LWP::Simple test failure upon installation of Task::Star (version 2015.03)

2015-03-25 Thread via RT
# 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

[perl6/specs] 74e3d7: Replace "uniq" fossil with "unique".

2015-03-25 Thread GitHub
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-

Re: Re-installation of Perl 6 (Rakudo Star) via rakudobrew on Linux

2015-03-25 Thread Steve Mynott
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

[perl #124167] [BUG] Test does not report correct test input source line number for failures

2015-03-25 Thread via RT
# 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.

Re: How to get indirect access to a class attribute?

2015-03-25 Thread Bruce Gray
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

How to get indirect access to a class attribute?

2015-03-25 Thread Tom Browder
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