sub { if (exists $_[1]->{id} and $_[1]->{id}+0 > 0) { $get_addr->execute($_[1]->{id}); my $result = $get_addr->fetchall_arrayref(); my ($street, $sity, $country) = ( $result->[0][0], $result->[0][1], $result->[0][2]); return address => "$_[1]->{street}, $_[1]->{city} ($_[1]->{country})" } else { return address => "$_[1]->{street}, $_[1]->{city} ($_[1]->{country})" } }