To lie perfectly:
1. you have to know why you are lying,
2. never forget the truth,
3. keep the truth a secret,
4. by never seeking sanction or approval for it from others.
The best liars know that the truth is moral, and that they have to keep it secret so as to protect the well being of people they value including themselves.