Put the gammon in a large deep pan and cover with cold water. Add the bay leaf, peppercorns and onion and bring to the boil. Skim off any scum that forms on the surface then cover and simmer gently for 1 hour, topping up with boiling water if needed.
Preheat the oven to 180°C, fan 160°C, gas 4. Remove the gammon from the liquid and set aside until it’s cool enough to handle. Cut away and discard the skin and nearly all the fat. Wrap the joint loosely in lightly oiled foil, put in a large roasting tin and roast for 1 hour.
Meanwhile, make the glaze. Put the honey, mustard and ginger beer in a pan and bring to the boil. Reduce the heat and simmer for 40-45 minutes until thickened, sticky and reduced by half. Leave to cool for 10 minutes.
Remove the roasting tin from the oven and uncover the gammon. Brush liberally with some of the glaze. Arrange the pear slices, overlapping slightly, all over the top of the gammon joint. Carefully brush with more of the glaze, then return to the oven. Roast, uncovered, for 30-40 minutes until the pears are tender and golden, basting occasionally with any remaining glaze.
Remove the gammon from the oven. Cover and leave to rest for 15 minutes before carving.