my $result = $object->method(); if($object->has_error) { $log->error("Something's gone wrong when called $object->method(): " . $object->error_message); # ...doing something with that... } # ...doing something else, understanding that the method just doesn't have anything to pass to us...