 Some evidence suggests that the doctrine descends from Roman law . The Corpus Juris Civilis mentions a process that redirected money collected to celebrate a person 's life in some way that violated law to a purpose within the law . It also gives a similar justification : " [ I ] t would be unjust that the amount which [ the testator ] has destined to that end should revert to the heirs . Therefore , let ... an investigation be made to ascertain how the trust may be employed so that the memory of the deceased may be preserved in some other and lawful manner . " The Byzantine Empire used a system similar to cy @-@ près when dealing with piae causae , charitable corporations , whereby if the corporation fell its possessions were to be transferred to the Papal treasury and spent on a purpose as close as possible to that of the original corporation . 
