You want to take a look at Re: Tutorial: Introduction to Object-Oriented Programming and learn about "inside out objects", a technique that gives you all that Java and co do without taking away anything from the freedoms Perl grants. See also Class::InsideOut - yet another riff on inside out objects..
For total isolation, you can also have $self be a closure that carries the properties around as lexicals in its closed scope. It might accept the name of property as its first parameter; or do something else. With this approach, not even instance methods can bypass the encapsulation. This is not really a useful approach, though.
Makeshifts last the longest.
In reply to Re: OOPerl isn't that bad after all...
by Aristotle
in thread OOPerl isn't that bad after all...
by yosefm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |