Carefully cut the lids of the pumpkin tops, using a small knife. Using a small spoon scape out the pumpkin innards and discard. Wash the pumpkins well, inside and out.
In a large bowl mix the eggs with the sugar, salt and the pandanus leaves, if using. Beat the mixture about the bowl to dissolve the sugar and bruise and tear the pandanus leaves, about 10 minutes. Continue beating, while adding the coconut milk. If using the extract there is no need to beat the mixture for that long. Simply mix everything well, until sugar is dissolved.
Strain the mixture into the pumpkins, leaving a 3 cm gap at the top.
Put the pumkins into a bowl slightly bigger then themselves. Steam them over high heat for about 45 minutes or until the custard is set.