The rhyme is cute,
but what does it really mean?
What about that second verse,
new to me?!
Here is one possible explanation:
Peter was a poor man who had an unfaithful wife. She kept cheating on him (couldn’t keep her), so he had to find a way to stop her running around. His solution, fairly common in the middle ages, was a chastity belt (pumpkin shell). For those who don’t know, a chastity belt is roughly a pair of metal underwear with lock and key, so that no one could enter the private region of the woman except whoever held the key, usually her husband. And as the rhyme goes, once he put her in that belt, he kept her very well.
Here is another possible explanation:
"Peter Peter is actually an American verse, and was unknown in England til fairly recent times. They had no pumpkins, which are a native American plant. The verse was actually written for children, no hidden meanings or naughty bits."http://www.sarambutcher.etsy.com/