in reply to Re^7: Introducing Class::InsideOut
in thread Introducing Class::InsideOut
It will work as long as the @ISA gets set up correctly. It's no different than what Class::InsideOut does to support inside-out objects. All anno's solution does is provide a default constructor that can take a foreign object.
Ah. Quite right. If you setup ISA appropriately it will still work. Still reblessing an already initialised object seems far more evil than the coupling of creation/initialisation it's trying to avoid. Not something I'd expect if I was reading the code.
Not that I disagree with the general concept - but I think C::IO made the right decision in not providing a default constructor. It makes it much easier to apply it to pre-existing class hierarchies no matter how they're organised.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Introducing Class::InsideOut
by Anno (Deacon) on Feb 17, 2006 at 12:15 UTC | |
by adrianh (Chancellor) on Feb 19, 2006 at 09:54 UTC | |
by Anno (Deacon) on Feb 19, 2006 at 13:53 UTC | |
by adrianh (Chancellor) on Feb 19, 2006 at 14:51 UTC |