in reply to Inside Out Classes and the internal Hashes
And using separate hashes means less typing.use strict; my %prop; sub method { my ($self) = @_; $prXp{id($self)} = 1; # throws an error: $prXp is not declared }
One other thing: using refaddr is not safe when using fork() (on windows) or threads (on any system) since the refaddr changes over a CLONE. Object::InsideOut seems to deal with this issue.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Inside Out Classes and the internal Hashes
by bart (Canon) on Dec 18, 2007 at 13:53 UTC |