An introduction to object oriented Perl

Terminology

Encapsulation

Generally:

  • The attributes of an object or class can only be accessed through the methods of an object or class.
  • Data is hidden from the rest of the application.

In Perl:

  • Objects can be treated as being normal, unblessed references: you can access attributes directly if you want to.
  • Encapsulation is a guideline not a rule. But it's a very good guideline.