in reply to (ar0n) Re: Heresy
in thread Heresy

You can enforce this rather trivially too. "The Damian"'s book shows how to let the return value from a constructor simply be a blessed scalar that is used as a hash key to a lexical hash -- the value of which is the real object! So there's never a chance that anyone outside the file could ever get at the guts of the object, at the cost of one small indirection during the first step of the call. You want privacy, you can have it!

-- Randal L. Schwartz, Perl hacker