I seem to remember the Prime Directive being something like this: "As the right of each sentient species to live in accordance with its normal cultural evolution is considered sacred, no Star Fleet personnel may interfere with the healthy development of alien life and culture. Such interference includes the introduction of superior knowledge, strength, or technology to a world whose society is incapable of handling such advantages wisely. Star Fleet personnel may not violate this Prime Directive, even to save their lives and/or their ship unless they are acting to right an earlier violation or an accidental contamination of said culture. This directive takes precedence over any and all other considerations, and carries with it the highest moral obligation."
if taken as the above, there are many instances where the Federation doesn't really enforce this too hard, depending on the politcial or military situation, or if the Federation considers the violation as something that might come back to bite the Federation later (see cross universe PD violations).
General Order One tends to be enforced as the plot demands but the general rule of enforcement seems to be "Don't, but if you must, have a REALLY good reason for doing so."
A brave little theory, and actually quite coherent for a system of five or seven dimensions -- if only we lived in one.
Academician Prokhor Zakharov, "Now We Are Alone"