WOULD RATHER / WOULD SOONER + perfect infinitive
Would rather/sooner + perfect infinitive expresses preferences about the past and means that the desired action was not performed:
Would you rather have had pork than beef? (Would you have preferred pork to beef?)
I'd rather have walked, but I went by bus because it was raining. (I would have liked to walk, but I went by bus because it was raining.)
If we omit rather, we get the main clause of a sentence in the third conditional:
I would have walked (if it hadn't been raining).