I've long been a proponent of required breathalyzer tests at security checkpoints for all airline personnel. It's not just a problem with pilots and alcohol consumption, I've seen many a FA with the problem and had a ramper push me me back from the gate that was slurring something awful over the headset.
If we are to ever full regain passengers' trust in our profession and once and for all remove the black cloud of the "drunk pilot" at the airport lounge, we need to take a hardline approach to the subject. Require anyone checking in for work for the day (whether ramper, FA, or pilot) to blow in a breathalyzer at the security checkpoint. If you blow over the .04, you're pulled instantly. I'm sorry, I'd rather hurt a few feelings and take the extra 30-seconds to blow than be on a plane with a person who is intoxicated and may not be able to function to the best of their abilities should an issue arise.
I'm sure this method will be met with strong resistance, but really how hard is it to not drink before having to fly? Hell, I don't even have a drink on layovers because I don't want to exacerbate the public perception of the drunk pilot. I'll save my drinking for when I'm at home watching the game.