http://www.perlmonks.org?node_id=831901


in reply to how to get out of subroutine without returning anything

Do you want o do anything with the data if the description is empty? If not the fast approach could be something like:

sub _get_user_scenario { my ($self, $schema, $user_scenario) = @_; return undef if $user_scenario->{description} eq ""; ...