Class Attributes

Learn about the private data associated with the objects.

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:

Access this course and 1400+ top-rated courses and projects.