stevan / p5-mop-redux

A(nother) MOP for Perl 5
139 stars 36 forks source link

is ro/rw compatibility with perl 6 #125

Closed forwardever closed 10 years ago

forwardever commented 10 years ago

the following article http://blogs.perl.org/users/btyler/2013/10/a-metaobject-protocol-for-core-perl-5-translated-from-russian.html

says:

use mop;
class Point {
   has $!x is ro = 0;
   has $!y is ro = 0;

   method clear {
       ($!x, $!y) = (0,0);
   }
}

This is almost a complete copy of Perl 6 syntax. At the moment only attributes with the $! twigil is supported, and they behave as public attributes (even though in Perl 6 they indicate private attributes).    

is this a bug in the mop, or in the article?

relates to https://github.com/stevan/p5-mop-redux/issues/78

stevan commented 10 years ago

This is a bug in the article, I will post a comment.

forwardever commented 10 years ago

thanks