in reply to Re^2: Should I use Fields, InsideOuts, or Properties?
in thread Should I use Fields, InsideOuts, or Properties?
It's true that for both methods you need to code your constructors with a view to inheritance, but you have to do that when using fields also.
For the manually lock hash, you just have to test whether you are constructing a new instance or adding to an existing class, and in the latter case, unlock the hash, add you fields and re-lock. I admit that doesn't provide the _\w* is private behaviour.
For the blessed arrays, inheritance is messy. Hence my agreement with adrianh.
Basically, I have still to find the perfect combination for OO in Perl, but I don't have cause to make a great deal of use of it.
|
---|