An well--posedness theorem for non--homogeneous inviscid fluids via a perturbation theorem