If you read the actual statutes cited you will see that Perry is not in the wrong, but simply doing what he was elected to do. It appears that the indictment is based on an illogical and unsupported interpretation of the law. So illogical in fact, that based on the prosecutor's apparent theory of the law (Texas Penal Code 36.03) he too is violating it.
A good summary is here.
Kindly see my post #70. And freeandfreezing, think you for the link. But unfortunately it contains too much legalese for me to follow.