A kind correspondent has claimed that a variant of the cited limerick was used in a moving picture and applied to the American writer F Scott Fitzgerald.
I have to say that I regard this as intrinsically improbable (A Diamond as Big as the Ritz?). The form lacks Lear’s traditional incipit ‘There was a …’ and so cannot be deemed original.
Evidence suggests that the authentic version is a fine example of the humour of the English Tommy at war, and originated in the campaign of 1884 which resulted in the tragic death of General Gordon.
For a similar limerick dating from the Punjab campaign of 1849 see:
There was a young man of Darjeeling
Whose member reached up to the ceiling
When he turned on the light
He’d a terrible fright
And a really remarkable feeling.