Class Attributes

Every Perl object is unique. Objects can contain private data associated with each unique object, often called attributes, instance data, or object state.

Defining an attribute

We define an attribute by declaring it as part of the class:

Get hands-on with 1200+ tech skills courses.