It doesn’t but as hallam pointed out, both Perry and Obama can say what they like now since they’re not running for re-election.
Moreover, if Perry did decide to run for president without having endorsed legal cannabis, he’s going to run into constituencies abandoning ship for equally conservative Libertarians who happen to be pro-pot.