Subject: | Cannot have object property 'id' |
Perhaps it is obvious after one thinks about it, but public and readonly
object property names automatically become function names. Therefore,
one cannot have an object property named 'id', 'options', etc., unless
it is private. Otherwise, bad things happen:
package MyClass;
use Class::InsideOut qw(:std);
public id => my %id;
# ...
produces:
Subroutine MyClass::id redefined at
/usr/lib/perl5/site_perl/5.8.8/Class/InsideOut.pm line 458.
Prototype mismatch: sub MyClass::id ($) vs none at
/usr/lib/perl5/site_perl/5.8.8/Class/InsideOut.pm line 458.
This restriction should be documented or (better) eliminated. (The
get_/set_ accessor style mentioned in the roadmap would do the trick, I
believe.)