Are you sure of the line? The closest I have heard is
Peter, Peter, pumpkin eater
Had a wife but couldn't keep her,
He put her in a pumpkin shell
and there he kept her very well.
/r/CChippy is right on this one. The wiki article, the source we love top hate, is good on this. It is apparently an American children's folk rhyme (hence the pumpkin) probably adopted from a Scottish prototype without the pumpkin.
edit: This is nice source, providing variants and suggesting it is entirely of American origin. It does not acknowledge a European prototype as does the wiki article. I find the identified possible Scottish prototype in the wiki article convincing.