package BasicAttributes;
use Moo;
use MooX::LazierAttributes;
use MooX::ValidateSubs;
has one => (
is => "ro",
default => sub { 10 }
);
has two => (
is => "ro",
default => sub { [qw/one two three/] }
);
has three => (
is => "ro",
default => sub { { one => 'two' } }
);
has four => (
is => "ro",
default => sub { 'a default value' }
);
has five => (
is => "ro",
default => sub { bless {}, 'Thing' }
);
has six => (
is => "ro",
default => sub { 0 }
);
has seven => (
is => "ro",
default => sub { }
);
has eight => (
is => "rw",
default => sub { }
);
has nine => (
is => "ro",
lazy => 1,
default => sub { { broken => 'thing' } }
);
has ten => (
is => "rw",
default => sub { {} }
);
has eleven => (
is => "ro",
default => sub { 'test this' }
);
has twelve => (
is => "ro",
default => sub { 'test this' }
);
has thirteen => (
is => "ro",
default => sub { 'test this' }
);
has fourteen => (
is => "rw",
builder => 1,
lazy => 1,
clearer => 1
);
has fifthteen => (
is => "ro",
default => sub { { { correct => 'way' } } }
);
sub _build_fourteen {
return 100;
}
1;