Declares an attribute for the class.
- package Bar;
- extends 'Foo'; # Foo has an 'attr' attribute
+ package Foo;
+ use Moo;
+ has 'attr' => (
+ is => 'ro'
+ );
+ package Bar;
+ use Moo;
+ extends 'Foo';
has '+attr' => (
default => sub { "blah" },
);