There once was an X from place B,
Who satisfied predicate P,
The X did thing A,
In a specified way,
Resulting in circumstance C.
That fabulous little limerick is from Wikipedia's page on meta-jokes -- a really awesome page (and, hence, probably at risk for deletion under Wikipedia's standing 'musn't-get-too-fun'). It's uneven -- some of what they cite as meta-jokes seem not to qualify, at least to me. But there's good stuff there. Here are two others I liked:
"How many members of a certain demographic group does it take to perform a specified task?"And, slightly less abstractly:
"A finite number: one to perform the task and the remainder to act in a manner stereotypical of the group in question."
A Priest, a Rabbi and a Leprechaun walk into a bar. The Leprechaun looks around and says, "Saints preserve us! I'm in the wrong joke!"
They also quote several classic not-quite-limericks, a sub-sub genre I must admit a certain fascination with. In addition to the famous ones about the men from Peru and Verdun, there is W. S. Gilbert's famous one:
There was an old man of St. Bees,And one by Tom Stoppard which I'd never seen before:
Who was stung in the arm by a wasp;
When they asked, "Does it hurt?"
He replied, "No, it doesn't,
But I thought all the while 'twas a Hornet."
A performative poet of Hibernia...and now I'm going to stop before I quote the whole damn page. Go read the rest if you're so inclined.
Rhymed himself into a hernia
He became quite adept
At this practice, except
For the occasional non-sequitur.