sub set_area { my $self = shift; my $area = shift; die "Area must be non-negative." unless $area >= 0; # ... }