develooper Front page | perl.perl5.porters | Postings from March 2011

Re: Revising Perl's OO docs - a new OO tutorial

Thread Previous | Thread Next
From:
Johan Vromans
Date:
March 8, 2011 23:07
Subject:
Re: Revising Perl's OO docs - a new OO tutorial
Message ID:
m262rsbwm5.fsf@phoenix.squirrel.nl
"Jan Dubois" <jand@activestate.com> writes:

> The part that is soo wrong is that by default the internal
> implementation on an object (e.g. hash ref) leaks out, and users can
> access it by mistake.

That's one of the reasons even a simple module like Class::Struct
prefixes the internal hash keys with the class name. (The other reason
is to enable inheritance.)

-- Johan

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About