The Pirate Planet is the second serial in the Key to Time[?] arc of Doctor Who. It was written by Douglas Adams, and featured some of Adams' style of humor.
The plot revolves around a planet that has been hollowed out and fitted with hyperspace engines, allowing its inhabitants to materialise it around other smaller planets and plunder their resources.