has
has make => ( isa => 'Str', is => 'rw', );
This code creates an object attribute called make.
isa specifies the type constraint. Other examples of isa values are:
- Str - A String.
- Int - An integer.
- Bool - A boolean value.
- An object (e.g. DateTime for a DateTime object.)
- A reference (e.g. ArrayRef)
These can also be mixed. For example, you can specify ArrayRef[DateTime]
is has two valid values: rw, and ro.