I don't advise cooking a pumpkin. It is cruel and the pumpkin will scream. Just make a jack o lantern out of it please! Don't torture it that way. Have you never heard of cruelty to pumpkins? If not then you have been living in a cave somewhere. Which cave were you living in? Was it in Afghanistan? If so you might have seen Osama there in your cave. Even HE would not torture a pumpkin by cooking it alive I bet you!
Boil the pumpkin until the flesh begins to soften and striates when you rake a fork across it. As the hot water breaks down the pumpkin, chemicals are released that give that sweet, pumpkin taste. Don't forget that while some strains of pumpkin are sweet, others are not and may require spices.