in reply to Re: Perl 6 class
in thread Perl 6 class

Thanks moritz for the reply. I've already tried without 'is rw' and it works, and also I saw a spec. But, the question is why I see the same example in spec:
Class traits are set using is: class MyStruct is rw {...}
and also see the same construction in wiki and it isn't work. You wrote:
(Update: it's an example in the spec, but I'm not sure what it means)
I think it means (from the spec):
If you declare the class as rw, then all the class's attributes default to rw, much like a C struct.

Replies are listed 'Best First'.
Re^3: Perl 6 class
by Limbic~Region (Chancellor) on Nov 18, 2008 at 16:22 UTC
    Stanislav,
    I am not sure moritz's answer explained things completely. If you understood great. If not (for those following along at home), here is more of the story. Unlike perl 5, perl 6 will not be specification by implementation. It has an independent specification and any implementation that passes the perl 6 test suite will be consider perl 6. While the perl 6 specification is still changing (very slowly - more fine tuning at this point), there are a number of implementations that are in various stages of completion. The Rakudo (perl 6 on parrot) implementation is not yet meeting the spec in this regard. That's the simple answer.

    See Getting Involved with Perl 6 - an Update for more information.

    Cheers - L~R

Re^3: Perl 6 class
by moritz (Cardinal) on Nov 18, 2008 at 16:10 UTC
    I've opened a ticket (perl 60636) for that, but I don't think it's high priority at the moment so it might take some time to get fixed (though patches are always welcome, and Patrick, Jonathan, Masak and I always try to review and apply them quickly).
      Thanks Moritz. Sorry, I'm not familiar with PIR, but when I'll have a free time I'll investigate in this direction.