Upon looking at this, a common pattern to consider instead is seeing if $survey->owner is a reference, i.e., do something like this:
my $owner = ref($survey->owner) ? $survey->owner->d : $survey->owner;
That way, the method can be updated to not care whether the survey owner field is fleshed or not.
Upon looking at this, a common pattern to consider instead is seeing if $survey->owner is a reference, i.e., do something like this:
my $owner = ref($survey->owner) ? $survey->owner->d : $survey->owner;
That way, the method can be updated to not care whether the survey owner field is fleshed or not.