How do you trap someone into committing perjury?
Like Bill Clinton was. He was stupid enough do do something morally humiliating even to himself. Then under oath he was asked if he did it. He was 'trapped'. Even though what they were asking about wasn't a crime, he was humiliated into perjury.
That is a perjury trap.
You can't trick someone into lying on the stand. The act of committing perjury depends on the target willingly lying under oath. If you trick them into saying something untrue then it can be considered a mistake, which is not perjury.
However you can, depending on the information, question someone in such a manner as to leave them no option other than to lie or to expose themselves. It does however depend on the information that you are using how you would trap them.