use strict; use warnings; use 5.012; package Point; use Moose; # automatically turns on strict and warnings has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); ############ my $p = Point->new(10, 20); say $p->x; say $p->y; --output:-- Use of uninitialized value in say at 2.pl line 44. Use of uninitialized value in say at 2.pl line 45.