On 2017-05-12T19:11:03+01:00, valkoles@gmail.com wrote:
Show quoted text> my $one = Foo -> new( foo => 2 );
> print $one -> foo, "\n"; # expect 2 here, but get 1
Stop expecting that. The documentation doesn't say you can pass class attribute values to a constructor, and I can't see why you'd want to. I'm not going to add support for this.
Show quoted text> $one -> foo( 3 );
> print $one -> foo, "\n"; # expect 3 here and get it
This is also undocumented, but works. No guarantees it will work in future versions.
The supported way of setting and getting values is:
Foo->foo( 4 );
print Foo->foo, "\n"; # expect 4 here and get it