if ($email->is_duplicate) { ... } if ($email->is_profane) { ... } # etc ... package MyEmail; sub is_duplicate { my $self = shift; $self->validate unless $self->is_validated; return $self->{is_duplicate}; } # all the others are the same sub validate { my $self = shift; # set some attributes $self->{is_validated} = 1; }