Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Seeking inside-out object implementationsby creamygoodness (Curate) |
on Dec 07, 2005 at 00:48 UTC ( [id://514693]=note: print w/replies, xml ) | Need Help?? |
You have just described my experience with Class::Std.
It took me a while to grok it, longer to debug why my constructor wasn't working, then a bit more to peer into the guts and figure out why something I was used to doing (deriving auxilliary member variables from either a default value or its user-overridden replacement) wasn't going to work unless Damian changed how Class::Std works. I filed a feature request via RT, but the change might actually introduce subtle bugs into existing Class::Std derivatives, so I don't think it can be done. I've gone back to using hash-based objects by default, but I use the inside-out technique every once in a while. It came in handy when I wanted to associate some instance variables with a blessed filehandle. http://www.rectangular.com/svn/kinosearch/trunk/lib/KinoSearch/Store/InStream.pm
In Section
Seekers of Perl Wisdom
|
|