Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you have so many accessible properties that you need to generate accessors for them, you may need to re-think your design. Accessors are a code smell.
But assuming you have good reason to have so many accessors, I'm sorry to say I don't have a satisfactory answer to your question. I would go with Class::Accessor::Lvalue because I think that something that behaves like a variable (being settable and gettable) should have an interface like a variable. It is also very clear about when you're setting and when you're getting. If you then use Class::Accessor for the read-only accessors, everything is taken care of. Caution: Contents may have been coded under pressure. In reply to Re: Class::Accessor and Damian's PBP
by Roy Johnson
|
|