“Every barrel of oil that comes out of those sands in Canada is a barrel of oil that we don’t have to buy from a foreign source,” Mr. Perry said in Clarinda, earning a loud round of enthusiastic applause.
What moves Republican crowds in Iowa
Now this is clearly a slip of the tongue: Governor Perry, despite all appearances, is not actually confused about whether or not Canada is part of the United States. It's safe to assume he knows Canada is a foreign country. So what did he mean to say?
One obvious substitution for the word foreign is Arabic. Or non-Caucasian. Or, more charitably, just non-Western or perhaps non-democratic. But if all Perry meant was "we shouldn't buy oil from non-democratic societies," why not say so? He wouldn't get any flack from any side for that.
On the other hand, he would get flack, even from some on the Right, for saying "non-White." Which explains why he made the slip of the tongue. He was looking for a word that his audience would understand as "non-White," but also a word that would not paint him as obviously and openly racist. So his brain settled on a word that just made him look dumb.
Which is actually really smart. His audience understood him perfectly; no one in that crowd was cheering because Perry was declaring energy independence from the UK or Germany. And the voices on the right who would have to condemn naked racism now have an excuse to look the other way. The only people who will say anything are liberals, like me, and all we can do is point out how dumb Perry sounds. Which will, of course, erode our credibility with the Right even further, since he didn't sound dumb to them. Indeed, only an idiot could fail to understand what he meant.
Which is why it's called a dog whistle, and not a sophisticated literary allusion.