how do I cook sausages without poking holes through them? I hear that when cooking sausages, you shouldn't poke holes in them as it will allow the flavour to spill out.

But whenever I don't do that with fat sausages, I end up getting the outside charred but the inside uncooked.
If you are charring the outside then you are cooking the sausages too fast. Sausages are best when cooked relatively slowly: on a low pan, or under a medium grill. 20-25 mins in a 200C/400F oven usually does the trick as well.