in reply to Re^2: RFR: Inside-out classes - a Class::InsideOut primer
in thread RFR: Inside-out classes - a Class::InsideOut primer
As for the importance of the id function, would you care to expand? ... I'd appreciate more insight into why I'm doing it
The real answer: Class::InsideOut expects/requires that the unique key for each object be its memory address (to ensure safety for threading and pseudoforks), so it provides the alias id() to Scalar::Util::refaddr.
To explain it in the primer, it may be sufficient to say that each object needs to have a unique key and Class::InsideOut requires the use of the id() function to generate that unique key.
Regarding Class::Std:
I would discourage its use to anyone who didn't really know what they were doing.
I think this is almost exactly what you should say in place of "deprecated".
-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^4: RFR: Inside-out classes - a Class::InsideOut primer
by Joost (Canon) on Mar 16, 2007 at 15:19 UTC | |
by xdg (Monsignor) on Mar 16, 2007 at 15:34 UTC |