Based on people he had observed in Hampstead, the song borrows from Robert Louis Stevenson's Treasure Island when the narrator calls himself “Long John Silver” […]. But apparently Anderson's fellow Edinburghian had no influence on “Mother Goose.”
Source: wiktionary