in reply to Question about defined loop

I'm not quite sure I understand your question. Perhaps you want:
sub not_exposed_reason { my ($self, $not_exposed_reason) = @_; $self->{_not_exposed_reason} = $not_exposed_reason // "No exposed +reason"; }
On older Perls, you may want to write that as:
sub not_exposed_reason { my ($self, $not_exposed_reason) = @_; $self->{_not_exposed_reason} = defined $not_exposed_reason ? $not_ +exposed_reason : "No exposed reason"; }