At DLR stations there is a red line which forms the boundary to the compulsory ticket area. If you stray beyond the red line an enforcement officer can technically reprimand you.
Its worth noting that the penalty fare (I think it's £80 now) is a the more lenient option, the other which involves a visit to magistrates court, a higher fine and a criminal record. You don't have to accept the penalty fare.
If someone innocently walks across the line without touching in and gets caught by an enforcement officer keen to nab his 10th victim and they protest your innocence. If they still believe you guilty of a crime (such as fare evasion or trespassing) they will take you name and address, read you your rights and ask for a statement. At a later data the CPS can then summons you to court, but I doubt they would bother if there is no evidence that you intended to evade paying the fare.
I am not sure how it works for foreigners as they are not likely to be in the country by the time it makes it to the CPS. If I were visiting a country and got faced with this situation then I would probably pay due to lack of knowledge of the countries legal system and worried that it could affect my ability to leave, re-enter or future visa applications.
Its sad that enforcement officers have targets like this and also sad that they need to target a location like LCY where there are likely to be a lot of people who are un-familiar with the country and London.