stevan/p5-mop-redux — pull request #158 by dex4er (2014-04-05 18:28:02+00:00)
Title: Attribute of static class means the default value for this attribute

I've changed the behavior of generated accessors for static class. I think the best way is to read or change the default value of an attribute.

This is the same behavior as for Python classes:

```python
class A:
a = 1
b = 2

class B(A):
b = 3

print A.a # 1
print A.b # 2
print B.a # 1
print B.b # 3

A.a = 11
B.b = 33

print A.a # 11
print B.a # 11
print B.b # 33

b = B()

print b.a # 11
print b.b # 33

b.a = 111

print b.a # 111
print B.a # 11
```

The same example coded with mop and this patch:

```perl
use v5.14;

use mop;

class A {
has $!a is rw = 1;
has $!b is rw = 2;
}

class B extends A {
has $!b is rw = 3;
}

say A->a; # 1
say A->b; # 2
say B->a; # 1
say B->b; # 3

A->a(11);
B->b(33);

say A->a; # 11
say B->a; # 11
say B->b; # 33

my $b = B->new();

say $b->a; # 11
say $b->b; # 33

$b->a(111);

say $b->a; # 111
say B->a; # 11
```