Perfect-fluid, generalized Robertson-Walker space-times, and Gray’s decomposition