in reply to Re^6: 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.
That said, I'm not sure where it really helps as his solution still either requires an overridding new to add an initialization call or else will provide an explicit call to an init or BUILD. The former approach doesn't really save any code and the latter approach is another straightjacket -- however comfy. Put differently, his new just makes it easier to generate either an anonymous scalar or to rebless an existing object.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Introducing Class::InsideOut
by adrianh (Chancellor) on Feb 16, 2006 at 12:35 UTC | |
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 |