2. Peel and core the pineapple, cutting it into slices one-half-inch thick. Place the pineapple slices onto a foil-lined baking sheet.

3. In a small bowl or measuring cup, stir together one-fourth cup rum with one-fourth cup sugar. Brush the rum and sugar mixture over the sliced pineapple.

4. Place the pineapple under the broiler and broil until the pineapple is a rich golden-brown in places and the sugar is caramelized, 6 to 10 minutes, depending on the moisture in the pineapple and heat of the broiler.

5. Remove from heat and set the baking sheet with the pineapple aside to cool, then cut the slices into one-half-inch chunks.

6. While the pineapple is cooling, combine the remaining rum, sugar, water, long peppers, cinnamon and star anise in a large saucepan. Bring the mixture to a boil over high heat, stirring occasionally.

7. Add the pineapple chunks to the mixture, reduce the heat to a simmer, and continue to cook until the pineapple is tender and the flavors are married, 10 to 15 minutes. Remove from heat and stir in the vanilla seeds and pod.

8. Place the mixture in a glass jar or bowl and set aside until cool. Cover tightly and refrigerate until needed. The confit will keep for up to two weeks, covered and refrigerated.