Encapsulation

Learn about encapsulation with Moose in Perl.

We'll cover the following...

Overview

Moose allows us to declare which attributes class instances possess (for example, a cat has a name), as well as the attributes of those attributes (we can name a cat once and thereafter its name can’t change). Moose itself decides how to store those attributes—we access them through accessors). This is encapsulation: ...